Common UI interactions with jQuery

In this post, I am listing some of the commonly used UI interactions when working with jQuery.

Button click on pressing Enter over a text box

$(document).ready(function(){
$("#btnSearch").click(function(){
$(".alert").show();
});
$("#txtName").keypress(function (e) {
        var key = e.which;
        if (key == 13)  // the enter key code
        {
            $("#btnSearch").click();
            return false;
        }
    });
});

Comments

Popular posts from this blog

The all new Movie Central

Movie Central 4.0 (New Release in works)

How to install nVidia Optimus driver