Set dynamic attributes to entire site
Today while integrating theme in WordPress i have asked to my TL that is it possible to set title attribute for a tag of the HTML without actually placing it to entire site.
She has given me solution which i am sharing here,
jQuery(function () { //set dynamic title attribute to <a> tag jQuery('a').each(function() { //check broken links for the SEO if(jQuery(this).attr("href")=="#" || jQuery(this).attr("href")=="") jQuery(this).attr("href","javascript:void(0);"); if(jQuery(this).text()!='') jQuery(this).attr("title",jQuery(this).text()); }); //set dynamic title attribute for the <input type=' submit'> tag jQuery('input:submit').each(function() { if(jQuery(this).val()!='') jQuery(this).attr("title",jQuery(this).val()); }); //set dynamic title attribute for the <input type=' button'> tag jQuery('input:button').each(function() { if(jQuery(this).val()!='') jQuery(this).attr("title",jQuery(this).val()); }); }); |
Above code will set title attribute for the <a> and <input> tags.
And this way developer can place such dynamic attributes which saves lots of development and designing time.
How to configure mail from localhost ( wamp ) using PHP?
I have searched a lot when I was required to configure mail using my localhost for my project. At many sites I have read that it’s just not possible to send mail using localhost. You have to upload your project on the net.
But after searching a lot I get to know that it’s possible to send mail using localhost without uploading the project. And today I post this blog so that the PHP programmer can get to know that it’s not that we just cannot send mail from localhost .We can do.
Steps to send mail from localhost:
Search in this website
our sponsors
latest comments
- shinto peter on How to configure mail from localhost ( wamp ) using PHP?
- tammylleanne on Implementation limitation of c programming language
- Deepak on How to access/unblock songs.pk in india?
- Deepak on How to access/unblock songs.pk in india?
- prk on How to access/unblock songs.pk in india?
Find us on Facebook
Top Authors
Find us on stackoverflow
Polls
My Bookmarks
- Audio/video Recorder & player application based on MATLAB
- check dependency of your binary
- defination of all standard c programming language function
- Great Question-Answer on c programming
- know what your c code means
- Limition of c programming language
- List of all version of c programming language
- Online c compiler
- php freelancing work
- some more stuff on C programming language
- Volatile Keyword in Embedded System
- Write Android application in c language