javascript - jquery tooltip shows a div's content - Stack Overflow

I want to use eitherorand I was wondering if lets say I have a div on my page that has a class &#

I want to use either / or / and I was wondering if lets say I have a div on my page that has a class 'item_info'.

Can I have my tooltip that is created output the div inside the tooltip and formatted properly according to my css?

Is there another plugin I should be looking into?

Thanks. I hope this is clear enough.

I want to use either http://onehackoranother./projects/jquery/tipsy/ or http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ and I was wondering if lets say I have a div on my page that has a class 'item_info'.

Can I have my tooltip that is created output the div inside the tooltip and formatted properly according to my css?

Is there another plugin I should be looking into?

Thanks. I hope this is clear enough.

Share Improve this question asked Apr 14, 2010 at 19:46 jimjim 1,1372 gold badges12 silver badges23 bronze badges 1
  • 2 What you are looking for is a tooltip that can include html contnet. flowplayer/tools/demos/tooltip/any-html.html – Enrique Commented Apr 14, 2010 at 20:08
Add a ment  | 

2 Answers 2

Reset to default 4

You could look into qTip

http://craigsworks./projects/qtip/demos/

http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ allows you to specify additional css class for your tooltip styling as well as display "dynamic" data for the text. Take a look at the example below.

Notable areas: bodyHandler specifies which text to show in your tooltip (this will return your html from div), extraClass specifies css style to apply. Hope that helps.

$("#your_tooltip_element").tooltip(
    {
        bodyHandler: function() {
            return $("#your_div").html();
        },
        showURL: false,
        track: true,
        delay: 0,
        showURL: false,
        opacity: 1,
        fixPNG: true,
        extraClass: "item_info",
        top: -15,
        left: 5,
        cursor: "hand"
        }
);

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742336786a4424809.html

相关推荐

  • javascript - jquery tooltip shows a div's content - Stack Overflow

    I want to use eitherorand I was wondering if lets say I have a div on my page that has a class &#

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信