最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Bootstrap Tooltip Placement Bottom not working? - Stack Overflow

programmeradmin9浏览0评论

I am trying to make my bootstrap tooltip work with dynamically created content and I was told to use this but it seems to not be placing my tooltips to the bottom what is wrong with my code

The javascript:

$('body').tooltip({
    selector: '[rel=tooltip]',
    placement: 'bottom'
});

JSFiddle: /

EDIT: $('[rel=tooltip]') doesn't work on dynamically added content

I am trying to make my bootstrap tooltip work with dynamically created content and I was told to use this but it seems to not be placing my tooltips to the bottom what is wrong with my code

The javascript:

$('body').tooltip({
    selector: '[rel=tooltip]',
    placement: 'bottom'
});

JSFiddle: http://jsfiddle/MyxhA/

EDIT: $('[rel=tooltip]') doesn't work on dynamically added content

Share Improve this question edited Jul 29, 2013 at 15:47 madth3 7,34412 gold badges52 silver badges74 bronze badges asked Jul 28, 2013 at 19:51 arberbarberb 9603 gold badges14 silver badges25 bronze badges 1
  • Try this jsfiddle/VXctp/612 – David Commented Jul 28, 2013 at 20:21
Add a ment  | 

1 Answer 1

Reset to default 5

don't attach that to the body simply use the selector

DEMO: http://jsfiddle/balexandre/MyxhA/2/

$('[rel=tooltip]').tooltip({
    placement: 'bottom'
});
发布评论

评论列表(0)

  1. 暂无评论