jQuery.fn.exists = function(){return this.length>0;}
if ($(selector).exists()) {
// Do something
}
This is in response to: Herding Code podcast with Jeff Atwood
Recent Posts
Subscribe to:
Post Comments (Atom)
jQuery.fn.exists = function(){return this.length>0;}
if ($(selector).exists()) {
// Do something
}
This is in response to: Herding Code podcast with Jeff Atwood
No comments:
Post a Comment