Answer: The jQuery #id selector is nothing but a controlID which uses the id attribute of an HTML tag to find the specific control.It must be unique on a page.
We have to use # sign followd by ControlID yo find control usng jQuery.
Syntax:-
$("#anyControlID")
For Example:-
<asp:Button ID="btnDelete" runat="server" Text="Delete"/>
<asp:Button ID="btnSave" runat="server" Text="Save"/>
$(document).ready(function(){
$("button").click(function(){
$("#btnDelete").hide();
});
});
Here,on clicking of save button,Delete button will be hidden.
Asked In: Many Interviews |
Alert Moderator