skip to Main Content

remove selected item using jquery

How I get active class only on click div not on all div?? html code <div class="col-12"> <div class="place" id="test-1"></div> </div> <div class="col-12"> <div class="place" id="test-2"></div> </div> <div class="col-12"> <div class="place" id="test-3"></div> </div> Jquery code // adding this div for…

VIEW QUESTION

How to Click many buttons by jquery for loop

I'm trying to call many button by one jquery function. following is my html and php code: Elements of button: for($q_no=1;$q_no<=30;$q_no++){ echo('<button class="q_no_btn" id="'.$q_no.'">Question no '.$q_no.'</button>'); } My Jquery code: $(document).ready(function(){ var q_no; for(q_no=1;q_no<=30;q_no++){ $("#"(q_no).click(function(){ alert("Click on 1!!!"); })) }…

VIEW QUESTION
Back To Top
Search