lundi 19 septembre 2016

How to select dynamic class in jQuery change function?

I have a input field having dynamic class as:

<input class="slider_1" id="1" type="checkbox" data-toggle="toggle">
<input class="slider_2" id="2" type="checkbox" data-toggle="toggle">
<input class="slider_3" id="3" type="checkbox" data-toggle="toggle">

I need to select specific class for change made to respective input field like:

$(".here_Specific_class").change(function() {
    // Ajax to perform check and uncheck
});

Note:

I am using bootstrap toggle http://ift.tt/1q1Vzos to make change in checkbox.




Aucun commentaire:

Enregistrer un commentaire