1
  <div class="btn-group">
   <button class="btn dropdown-toggle" data-toggle="dropdown"> Reviews </button>
   <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
   <ul class="dropdown-menu">
      <li><a href="#" id="reviewhover" rel="popover" placement="right" data-content="Reviewer:testuser is too good, too cool, too sad, too bad, too right, too wrong">testuser 2012/08/12 12:25:42:836 PM</a></li>
      <li><a href="#" id="reviewhover" rel="popover" placement="right" data-content="Reviewer:testuser11 is too">testuser11 2012/08/13 12:25:42:836 PM</a></li>
    </ul>
 </div>​

I am using bootstrap.min.js v2.0.4 and jquery 1.7.2, tried with jquery 1.8.0 and 1.7.1 with same results

I have this js code in tbspopover.js -

 jQuery(function(){
     $('a[rel=popover]').popover();
 });

Script Order

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script src="/vendor/bootstrap.min.js"></script>
<script src="/js/views/tbspopover.js"></script>
Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
user1447121
  • 2,861
  • 4
  • 22
  • 23

3 Answers3

1

The js function to enable popover was called before the element was added to DOM. The DOM element wasn't added until after ajax call was done. Found a tip here

Community
  • 1
  • 1
user1447121
  • 2,861
  • 4
  • 22
  • 23
0

With an older Version (2.0.2) of Bootstrap it should work.

You can find a working example here.

Older Versions of Twitter Bootstrap can be found on Github here.

HaNdTriX
  • 28,732
  • 11
  • 78
  • 85
  • thanks for the pointer to tags on github, i should have looked there instead of searching thru commit history. i tried my code on jsfiddle and it works, on 2.0.2 and jquery version 1.7.2. now i will try with 2.0.2 – user1447121 Aug 14 '12 at 09:18
  • jqery 1.7.2 and twitter bootstrap 2.0.2 individual js files and twitter bootstrap 2.0.3 css still does not work in my program. i know it works on jsfiddle if i click on twitter bootstrap 2.0.2 (js only): http://jsfiddle.net/JXc7Q/ However, it doesn't work on jsfiddle if i use resources to load the js files that are required i.e dropdown, popover, tooltip - – user1447121 Aug 14 '12 at 09:47
0

I had a similar issue, it was because font-size of .btn-group was set to ZERO!!

Khaled Jouda
  • 293
  • 3
  • 8