How to use jQuery UI previous next image buttons?
I have used JQuery calender control which has previous next buttons on the header开发者_运维技巧. They also have hovering effect. I want to use the same functionality (prev, next buttons with hovering and clicking support) and add those image buttons my slider control which is present in another part of the page.
I tried copying the HTML from firebug, but it does not produce hovering effect. Could you please specify to exactly include those Prev, Next buttons? I will hook custom code to their click event. But I want to use images and hovering as it is for calender control.
You need jQuery UI Button.
$("#previous").button({
icons: {
primary: "ui-icon-triangle-1-w"
}
});
$("#next").button({
icons: {
primary: "ui-icon-triangle-1-e"
}
});
You will have to use the same css classes and add a mouseenter / mouseleave event listener that toogle the "hover" class. Be aware that the "hover" class technique used in jQuery can lead to "sticky" hover state in some cases, if so use a .blur() after the click event.
精彩评论