How to add auto alt & Title tag to blogger
To add this auto alt & title tag to the every images in blogger.
You have to add a simple script to the blogger blog. Follow the simple steps to install this script to blog.
Go to Blogger.com
Go to templates and backup your template.
Edit HTML to add the script manually.
Search for </body> tag
Add the following code just before the </body> tag and Save the template.
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' type='text/javascript'/>
//SEO SCRIPT By - begidailytips.com
<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>
});
});
//]]>
</script>
No comments:
Post a Comment