Friday, September 7, 2012

Is there an “exists” function for jQuery, Check Element Exits or not With jQuery

Is there an “exists” function for jQuery

Solution : 

JQuery.fn.exists = function(){   return this.length>0;   }

if (  $(selector).exists()  ) {
         // Do something

There you go!

Cheers !
Hope you got the Ans !
still having probs ? let me know by comments !

Know More About :
PHP Freelancing India



Post a Comment

Any Questions or Suggestions ?


Professional & Experienced Freelance Developer From India, Technologist, Software Engineer, internet marketer and Open Sources Developer with experience in Finance, Telecoms and the Media. Contact Me for freelancing projects.

Enter your email address:

Delivered by FeedBurner

PHP Freelancer India - Google+