Quantcast
Channel: can't acess my checkbox with JQuery - Stack Overflow
Viewing all articles
Browse latest Browse all 5

can't acess my checkbox with JQuery

$
0
0

i encounter troubles to acess an input of type chekcbox with JQuery here is my html code :

<th class="bill"  width="19%" scope="col"><input type="checkbox" name="sup'+i+'" class="bill" value="'+i+'"/></th> 

here you see that my input is inside a tag that have a class "bill", now i want to capture the event on my checkbox and simply write a message.

$('.bill input[type=checkbox]').change(function() {     console.log("it works");})

But nothing appears in the console !! it seems that there is something wrong with my event listener.


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>