I have the following:
<input type="submit" id="submit" value="Submit" />
Inside of jQuery I have have the following:
<script type="text/javascript">
$(document).ready(function () {
$("#submit").on("click", function () {
alert('test');
});
});
</script>
This doesn't work. I am using IE9.
Might anybody know which version of Jquery is supporting .on()
?
Use this version of on
$(function(){
$(document).on("click","#submit", function (e) {
//e.preventDefault(); // if you want to prevent default form submission
alert('test');
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With