javascript - Flip toggle switch (jQuery) on change not firing -
i need fire event (which sends post data external script) when state of toggle switch changes, cannot basic example work...
can please tell me doing wrong?
html:
<label for="flipswitch">option:</label> <select name="flipswitch" id="flipswitch" data-role="slider"> <option value="off">off</option> <option value="on">on</option> </select>`
javascript (in <head>
section):
<script> $('#flipswitch').change(function(){ console.log("flipswitch"); }); </script>
the code works me. sure you're looking @ console output? have code in $('document').ready(function() {
)};
Comments
Post a Comment