0

I am unable to load remote html data using bootstrap popover. Below is my code. I tried this from below

Load a Bootstrap popover content with AJAX. Is this possible?

<a href="#" id="oneData" class="divAnchor" rel="popover" 
           load-remote-data="TestGetJson.htm">Bootstrap popover with ajax data</a>

Below code is inside script tag. When I debug using firebug i get response from server But it is not shown in the screen.

$(document).ready(function() {
    $('#oneData').bind('click',function(){
        var e=$(this);
        //e.unbind('click');
        $.get(e.attr('load-remote-data'),function(data){
            e.popover({content: data, placement:'bottom', html:true}).popover('show');
        });
     });
});

Response from server

<div class="popover fade bottom in" ><div class="arrow"></div><h3 class="popover-title">pop Over Title</h3><div class="popover-content">Data From Server</div></div>

used below imports in my code

<script type="text/javascript" src="js/jquery-1.7.js"></script>
<link href="css/bootstrap-popover.min.css" rel="stylesheet" media="screen"/>
<script type="text/javascript" src="js/bootstrap-popover.min.js"></script>
Community
  • 1
  • 1
suresh
  • 17
  • 7
  • any errors in the console – Arun P Johny Mar 18 '13 at 08:54
  • @ArunPJohny, Thanks. I do not know that we can check javascript error in the firebug console. Its solved. Problem with the file "js/bootstrap-popover.min.js". It has no popover method. – suresh Mar 18 '13 at 09:26
  • @suresh - Welcome to Stack Overflow. Great your problem was solved! Consider adding an answer to your own question, so that everybody knows your problem was solved. Thanks! – Marijn Mar 18 '13 at 09:33
  • @Marijn I have less than 10 reputation. So I will add answer in 8 hours. – suresh Mar 18 '13 at 09:46
  • That would be great. Many people (me too) check if there are unanswered questions, so adding an answer is very useful. – Marijn Mar 18 '13 at 09:49

1 Answers1

0

Issue was with wrong file import. So marking this question as answered.

suresh
  • 17
  • 7