Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

selector id jquery but is variable

//<p id="id-1"></p>
var id = 1;
$('#id-' + id).hide();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #selector #id #jquery #variable
ADD COMMENT
Topic
Name
3+2 =