Below is a simple function that can tell you if a specific ID exists or not :
function id_exists(id) { if ($("#"+id).length == 0) { return false; } return true; }
How to check if an id exists using jQuery
Below is a simple function that can tell you if a specific ID exists or not :
function id_exists(id) { if ($("#"+id).length == 0) { return false; } return true; }
Rating: (0+, 0-) In: jQuery