Tagged: Check if Element Exists using jQuery

How to Check if Element Exists using jQuery?

Java Script if ($(‘#myElement’).length > 0) { // it exists } Or to make it a fancy function with a callback: // Tiny jQuery Plugin // by Chris Goodchild $.fn.exists = function(callback) { var...