vendredi 7 octobre 2016

JQuery element not selecting

I have the below function that runs when the page loads but doesn't run when a checkbox is selected. Does anyone know why?

function filterFilesList() {
        alert('filter');    
    }

    $("#filterControls :checkbox").click(filterFilesList);
    filterFilesList();  

<div id="filterControls"><ul><h4>Business Divisions</h4><label><li><input type="checkbox" value="SMB"><span></span>SMB</li></label><label><li><input type="checkbox" value="DCS"><span></span>DCS</li></label><label><li><input type="checkbox" value="DPS"><span></span>DPS</li></ul></div>




Aucun commentaire:

Enregistrer un commentaire