You have to put the event handler in the $(document).ready() event:
$(document).ready(function() {
$("#btnSubmit").click(function(){
alert("button");
});
});
More Related Contents:
- How to check with jquery if this conent is null
- How to Use slideDown (or show) function on a table row?
- How do I block or restrict special characters from input fields with jquery?
- Jquery – How to make $.post() use contentType=application/json?
- Calling a ‘WebMethod’ with jQuery in ASP.NET WebForms
- jQuery onclick toggle class name
- form confirm before submit
- jQuery .attr(“disabled”, “disabled”) not working in Chrome
- Click trigger on select box doesn’t work in jQuery
- Fading in a background image
- Jquery Datepicker Chrome
- current/duration time of html5 video?
- Resize SubGrid Columns on resizing main grid
- How to find the highest z-index using jQuery
- How to get Interdependent dropdowns in django using Modelform and jquery?
- Unable to load google in iframe in fancybox
- get html of external url in jquery
- How do I duplicate item when using jquery sortable?
- How do I filter the returned data from jQuery.ajax()?
- AngularJS: $viewContentLoaded fired before partial view appears
- How do I get actual image width and height using jQuery?
- How to prevent page scrolling when scrolling a DIV element?
- Execute jQuery function after another function completes
- Get index of selected option with jQuery
- Jquery: how to trigger click event on pressing enter key
- Determine vertical direction of a touchmove
- jQuery countdown timer
- Wrap some specified words with span in jQuery?
- Twitter Bootstrap Carousel cycle items right to left ( RTL ) reversed
- Removing multiple classes (jQuery)