javascript - Bootstrap Popover will Only Load Once. Why? -


i have boostrap popover show once , not work. missing?

here js fiddle

the problem due $().load();, it's asynchronized , when return $("#pop-content").load(...); first time return contents of #pop-content div, , thereafter contents of #pop-content set result of url you've mentioned in jquery load, in case it's blank.

i've replaced $(#pop-content).load(...); $(#pop-content).html(); , results expected.

see fiddle

edit

$(document).ready(function () {     $('.pop-form').popover({         html: true,         title: function () {             return $("#pop-head").html();         },         content: function () {            var result = '';            $.ajax({             url: "your url",             async: false,              success:function(response){                 result = response;             }            });             return result;         }     });      // make popup larger     var p = $('.popbutton').popover();     p.on("show.bs.popover", function (e) {         p.data()["bs.popover"].$tip.css("max-width", "630px");     }); }); 

try above code, should work well.


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -