MemoryRefresh!

Element / Check if exists     Check if exists



Questions Answers 0%

Pages   0 from 16
Questions   0 from 21

Reset



<script src="code.jquery.com"></script> <div id='mydiv'>My div</div> <script> if ($("#mydiv").length > 0) { $("#mydiv").html("My div exists"); } </script> aaronrussell.co.uk
1) Check if element exists.









<script src="code.jquery.com"></script> <div id='mydiv'>My div</div> <script> if ($("#mydiv").length > 0) { $("#mydiv").html("My div exists"); } </script> aaronrussell.co.uk





Programming

Php
   
Regex
   
MySQL
   
Css
   
jQuery
   
Git
   


References
n/a