How I can display some category on page load with jquery? -


i have list of items

<div class="cat1">item 1</div> <div class="cat2">item 1</div> <div class="cat3">item 1</div> <div class="cat2">item 1</div> <div class="cat3">item 1</div> 

how can display "cat3" on page load jquery?

first set div's display none , in document ready display whatever class want to

<div class="cat1" style="display:none;">item 1</div> <div class="cat2" style="display:none;">item 1</div> <div class="cat3" style="display:none;">item 1</div> <div class="cat2" style="display:none;">item 1</div> <div class="cat3" style="display:none;">item 1</div>    $(document).ready(function(){  $(".cat3").show();  }) 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -