Check if div exists on page


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. if ( $('#myDiv').length ) {
  2. // do something with myDiv
  3. }

URL: http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/

Report this snippet


Comments


You need to login to view comments.