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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -