javascript - Jquery onchange does not trigger -


$('#selectclassid').trigger("change");     $('#selectclassid').on('change', function() { }); 

i have format onchange manual trigger of on change problem is not firing. wondering because format see in tutorials. there wrong in format of on change. hoping fire on change when page loaded. way select option in div hidden on load.but show on button click if event related problem. idea appreciated

hm, seem triggering event before attach - try other way around

 $('#selectclassid').on('change', function() {      console.log("fired")  });   $('#selectclassid').trigger("change"); 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -