Add click event using jquery

To add click event using jquery we use .click method of jquery. We can add click event on page load but we can also add event whenever needed.

<input type="button" value="Click me" id="btnBindClick" />

<script type="text/javascript">

    $(function () {
        $("#btnBindClick").click(function () {
            alert("Click is binded using jquery");
        });
    });
   

</script>

Comments

Popular posts from this blog

Using Progress Bar In C#

Get elements by class name in javascript

Jquery serer side datatables in asp.net