how do you add an image to a jquery tooltip

后端 未结 3 2012
攒了一身酷
攒了一身酷 2020-12-01 11:05

I haven\'t seen this exact question addressed...if it has been, just please point me to it.

I\'m using jquery\'s ui tooltip. I have one link that when you mouseover

3条回答
  •  Happy的楠姐
    2020-12-01 11:54

    try this one :

    Html

    image of 1 Maple St.
    

    JQuery

    $( "#riverroad" ).tooltip({ content: '' });
    

    See the working fiddle.

    Jquery 1.9.1 and JqueryUI 1.9.2 are included of course. Check if your image path is correct by the way.

    Edit : You told me that you're setting the link with jQuery, see this second working example :

    Html

    JQuery

    $(document).ready(function() {
       $("#content").html('image of 1 Maple St.');
       $("#content #riverroad").tooltip({ content: '' }); 
    
    });
    

    Here is the new fiddle !

提交回复
热议问题