Add Auto Title Alt Tag In Your Blogs Photo
Every person
loves his blog and wanted to design it their best. They want to make their blog
most beautiful and easiest to use. You upload many photos in your blog
regularly and you need to add titles, Picture size, place and Alt tag title
manually. Today I give you a script which helps you to add title, Picture size,
place and Alt tag title automatically.
Process:
- 1. Go to Your Blogger Dashboard.
- 2. Open the Template option.
- 3. Wait for the full page load.
- 4. Create backup of your Template.
- 5. Edit your template.
- 6. Search the </body> tag in your template editor.
- 7. Then paste the below code before the </body> tag.
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' type='text/javascript'/> <script type='text/javascript'> //<![CDATA[ $(document).ready(function() { $('img').each(function(){ var $img = $(this); var filename = $img.attr('src') $img.attr('title', filename.substring((filename.lastIndexOf('/'))+1, filename.lastIndexOf('.')));$img.attr('alt', filename.substring((filename.lastIndexOf('/'))+1, filename.lastIndexOf('.'))); }); }); //]]> </script>
- 8. Now save it.
N.B.: It is only works in Blogspot Blog.


