javascript - Twitter Bootstrap Tooltip Data-selector? - Stack Overflow

What is the data-selector option used for in Twitter's Bootstrap Tooltip?The description reads..

What is the data-selector option used for in Twitter's Bootstrap Tooltip? The description reads...

If a selector is provided, tooltip objects will be delegated to the specified targets.

But I don't understand its purpose or how to use it.

What is the data-selector option used for in Twitter's Bootstrap Tooltip? The description reads...

If a selector is provided, tooltip objects will be delegated to the specified targets.

But I don't understand its purpose or how to use it.

Share Improve this question edited Nov 24, 2012 at 21:10 Fynn 4,9034 gold badges35 silver badges76 bronze badges asked Nov 24, 2012 at 20:58 Adam YoungersAdam Youngers 6,7598 gold badges39 silver badges53 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

It is the similar to using jQuery delegation methods like on() or delegate() in order to account for tooltip elements that aren't present in page when code is run.

Example binding to body since it is always present in page

$('body').tooltip({
   selector: '.mytooltipClass'

})

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

相关推荐

  • javascript - Twitter Bootstrap Tooltip Data-selector? - Stack Overflow

    What is the data-selector option used for in Twitter's Bootstrap Tooltip?The description reads..

    2天前
    60

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

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

关注微信