0





73

Advertisement

I'm trying to add tool tip on mouse hover, tooltip should display at bottom of mouse pointer. It alert when I hover on date but unable to bind tooltip. Here is my fiddle link

Js Code

<script type="text/javascript">
    $('#academic_calendar').datepicker({
        minDate:0,      
    });
    $(".ui-state-default").live("mouseenter", function() {
        console.log("Hover");
    });
</script>
Question author Shivam-pandya | Source

Advertisement


0


jQuery live is deprecated. You need to use .on or .bind handlers. I updated the fiddle with the tooltip.

 <script type="text/javascript">
   $('#academic_calendar').datepicker({
    minDate:0,      
   });

   $(".ui-state-default").on("mouseenter", function() {
     $(this).attr('title', 'This is the hover-over text');  // title attribute will be shown during the hover
   });
 </script>
Answer author Vinoth