2

Using the JQuery UI datepicker, in the header it gives you the option to go to the next month or previous month with left/right arrows. My question is what is the css property to change the colors when hovering over the previous or next arrows?

3 Answers 3

1

ui-state-hover is the class that is applied when hovering, see here

Sign up to request clarification or add additional context in comments.

Comments

0

It's a little harder than it seems. As NimChipsky pointed out, it's in ui-state-hover, but the colors aren't there directly.

If you look at ui-state-hover, out of the box, you will see something that looks like:

background-image: url("images/ui-icons_222222_256x240.png");

Basically, this is telling you that you will be using an icon sheet with color #222222, but the icon sheet graphic has to be available. You can generate other icon sheets directly, with other colors, by using the jQuery UI theme builder.

Comments

0
<script>
    $(".ui-datepicker-next, .ui-datepicker-prev").hover(function () {
        $(this).addClass("hover");
        },
    function () {
        $(this).removeClass("hover");
        });
</script>

and css for your class 'hover'

.hover
{
    background-image:url('paper.gif');
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.