Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery test div exists

$(document).ready(function() {
    var $myDiv = $('#DivID');

    if ( $myDiv.length){
        //you can now reuse  $myDiv here, without having to select it again.
    }


});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #test #div #exists
ADD COMMENT
Topic
Name
3+4 =