How to check if an id exists using jQuery
How to check if an id exists using jQuery – Edit content (add a revision)
Below is a simple function that can tell you if a specific ID exists or not : [code,javascript] ------ function id_exists(id) { if ($("#"+id).length == 0) { return false; } return true; } ------
Save as new Revision
Syntax docs