{"id":1385,"date":"2022-08-30T15:16:05","date_gmt":"2022-08-30T15:16:05","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/15\/ajax-bootstrap-popover-object-object-has-no-method-popover-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:16:05","modified_gmt":"2022-08-30T15:16:05","slug":"ajax-bootstrap-popover-object-object-has-no-method-popover-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/ajax-bootstrap-popover-object-object-has-no-method-popover-collection-of-common-programming-errors\/","title":{"rendered":"Ajax Bootstrap Popover: Object #&lt;Object&gt; has no method &#39;popover&#39;-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying to build an Ajax Bootstrap Popover to display a page that contains a rating star system.<\/p>\n<p>The javascript here work nice the first time. Then I have this error:<\/p>\n<blockquote>\n<p>Uncaught TypeError: Object # has no method &#8216;popover&#8217;<\/p>\n<\/blockquote>\n<p>I&#8217;m not really good in jQuery, but I guess it seems to be due to the ajax call, but I can&#8217;t find where the problem is.<\/p>\n<pre><code>$(\".myRate\")\n        .popover({\n            offset: 10,\n            trigger: 'manual',\n            animate: false,\n            html: true,\n            placement: 'top',\n            template: '<\/code><\/pre>\n<h3 class=\"popover-title\"><\/h3>\n<pre><br \/>'\n\n        });\n$('.myRate').mouseenter(popoverDisplay);\n\npopoverDisplay = function() {\nvar el = $(this);\nvar _data = el.attr('alt');\n$.ajax({\n     type: 'GET',\n     url: 'notes.php',\n     data: _data,\n     cache: false,\n     dataType: 'html',\n     success: function(data) {\n        el.attr('data-content', data);\n        el.popover('show');\n     }\n  });\n}\n<\/pre>\n<p><code>I don't get what I am doing wrong... Any idea ?<\/code><\/p>\n<p><code><strong>EDIT:<\/strong><\/code><\/p>\n<p><code>After searching, it seems that, it's the loaded pages which causes this error.<\/code><\/p>\n<p><code>Exactly this part:<\/code><\/p>\n<p><code>It seems that loading jquery-1.7.2.js make the bug because if I remove it, the error disapear. Problem: I can't delete it because without it jRating doesn't work anymore :\/<\/code><\/p>\n<ol>\n<li>\n<p><code>I had this problem after running the rails twitter bootstrap generator, then switching to bootstrap-sass.<\/code><\/p>\n<p><code>It was caused by a filename collision because boostrap-sass references bootstrap.js instead of twitter\/bootstrap, which clashes with the generated file.<\/code><\/p>\n<p><code>Just rename the generated app\/assets\/javascripts\/bootstrap.js.coffee to something else, eg app\/assets\/javascripts\/bootstrap_and_overrides.js.coffee, and you're good to go.<\/code><\/p>\n<\/li>\n<li>\n<p><code>I had the same problem. I was loading jQuery.js twice... Narf...<\/code><\/p>\n<\/li>\n<li>\n<p><code>i had the same problem . you might be loading jquery AFTER loading bootstrap.js . for some reason the sequence is important<\/code><\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-15 09:07:58. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to build an Ajax Bootstrap Popover to display a page that contains a rating star system. The javascript here work nice the first time. Then I have this error: Uncaught TypeError: Object # has no method &#8216;popover&#8217; I&#8217;m not really good in jQuery, but I guess it seems to be due to the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1385","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1385"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1385\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}