I have an Asp.Net button and I am applying flick theme to my buttons and it's applying to it but on mou开发者_StackOverflowse hovering it doesn't change the colour.
Here is what I am doing?May be I am wrong Can anyone guide me through this as I am able to work with normal html button by using
<button>Click Me!</button>
This is how I am working with Asp.net button:
<asp:Button ID="Button1" runat="server" Text="Click Me!" CssClass="ui-button ui-state-default"/>
In ASP.NET the ID get's transformed so you can't pass it as a selector. You could probably use a class instead.
So instead of
$('#Button1').button();
use
$('.MyButtonStyle').button();
EDIT:
BTW, you shouldn't be adding any jquery-ui classes to the button manually (your example looks like that's what you are doing). This is all done by the .js file included with jquery ui
Anyways I found the answer and here is what I have did and worked well!
<script type="text/javascript">
$('#btnSample').button();
</script>
Code for displaying:
<asp:Button ID="btnSample" runat="server" Text="Click Me!"/>
try to set button property as
ClientIDMode="Static"
Then
man its easy , just add the following and it will work just fine :
$(function () {
$("input[type=submit]").button();
});
精彩评论