Browsing all articles tagged with php - Share Programming Tips
Sep
18

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.

Oct
1

How to configure mail from localhost ( wamp ) using PHP?

Author Arpi    Category PHP, Tips     Tags ,

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:

read more

Follow us on Twitter! Follow us on Twitter!

Search in this website

our sponsors

latest comments

Find us on Facebook

Top Authors

35 posts
saurabh
22 posts
10 posts

Find us on stackoverflow

Polls

Tell us who you are

View Results

Loading ... Loading ...

My Bookmarks

Sponsers Link