[RESOLVED]What am I doing wrong in trying to run script from an aspnet control

I usually call a function from the tag using the onclientclick, but I want to actually run some script at the control. What am I doing wrong with the following?

<asp:Button id="btn1" runat="server" Text="+"
OnClientClick="function(){$('div[id$=div1]').css('display','block'); alert();}"></asp:Button>			  

get rid of function() 

<asp:Button id="btn1" runat="server" Text="+"
OnClientClick="$('div[id$=div1]').css('display','block'); alert();"></asp:Button>	

Thanks!

Leave a Reply