Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display a pointer when hovering over an icon

Below I have a Jquery datepicker and a jquery timepicker (both trent richardson's datepicker and timepicker)

 $(function() {
        $( "#datepicker" ).datepicker({minDate: 0, 
        dateFormat: "dd-mm-yy",
        showOn: "button",
        buttonImage: "Images/calendar.gif",
        buttonImageOnly: true});
    });



        $('#durationpicker').trenttimepicker({
            timeFormat:'hh mm ss',
            hourGrid: 4,
            minuteGrid: 10,
            secondGrid: 10,
            showOn: 'button',
            buttonImage: "Images/clock.gif",
            buttonImageOnly: true
            });

        });

Now both datepicker and timepicker are accessed by the user clicking on an icon (a calender icon for datepicker and a clock icon for timepicker ('#durationpicker'). What my question is that how can I get it so that the pointer cursor appears when the user is hovering over the two icons?

Below is the html:

<p><strong>3: Duration:</strong> <input type="text" id="durationpicker" name="durationChosen" readonly="readonly" />

<p><strong>4: Date:</strong> <input type="text" id="datepicker" name="dateChosen" readonly="readonly" />
like image 902
user1180490 Avatar asked Feb 03 '12 09:02

user1180490


2 Answers

.ui-datepicker-trigger{cursor:pointer}
like image 60
Yorgo Avatar answered Nov 05 '22 08:11

Yorgo


           $( ".ui-datepicker-trigger" ).css('cursor','pointer');   

This works for me the jQuery way, you can include it in your script and it should not give you any issues. I'm using it myself for a project with both jQuery ThemeSwitcher and jQuery UI Themes.

This is a wild guess, but should take you where you need to :)

like image 21
Jean G.T Avatar answered Nov 05 '22 08:11

Jean G.T