/ Published in: jQuery

Great way to check if a node exists before running a piece of code.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
(function($) { $.fn.extend({ exists: function() {return this.length>0;} }); })(jQuery)
Comments
