button click using jquery
- by DotnetSparrow
Hi All:
I have an asp.net button on a page without masterpage like this:
<asp:Button ID="target" runat="server" Text="Animate Me" >
</asp:Button>
and I am calling this:
var panel = $('#<%= target.ClientID %>');
panel.click(function(){
alert($(this).attr("value"));
});
but no alert is shown. I even tried this:
$('#target').click(function(){
alert($(this).attr("value"));
});
but It didnt work.
Please suggest me how to click the button and what is issue in above code.
Thanks.