class - jQuery selector id not recognized issue -
<div class="ground"> <div class="row"> <div class="box" id="block1"> </div> <div class="box" id="block2"> </div> <div class="box" id="block3"> </div> <div class="box" id="block4"> </div> </div> </div>
this html.
$(document).ready(function(){ $('#block1').click(function(){ $(this).slideup(); }); });
this script. here, trying make division id thing when clicked. however, simple code won't work.
when put div "block1" id outside div class=ground, works ok. whenever put in inside other tags, selector not recognize id , nothing happens when click it.
to knowledge id should recognized regardless of belongs, isn't it?
Comments
Post a Comment