{"id":1724,"date":"2022-08-30T15:18:55","date_gmt":"2022-08-30T15:18:55","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/29\/rails-fancybox-rails-not-working-throwing-has-no-method-fancybox-error-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:18:55","modified_gmt":"2022-08-30T15:18:55","slug":"rails-fancybox-rails-not-working-throwing-has-no-method-fancybox-error-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/rails-fancybox-rails-not-working-throwing-has-no-method-fancybox-error-collection-of-common-programming-errors\/","title":{"rendered":"Rails &amp; FancyBox-Rails Not Working, throwing has no method &#39;fancybox&#39; error-Collection of common programming errors"},"content":{"rendered":"<p>Just created a new Rails app &amp; have run into some problems with fancy-box rails and am getting this error:<\/p>\n<pre><code>Uncaught TypeError: Object [object Object] has no method 'fancybox' \n<\/code><\/pre>\n<p>Here is the JS being loaded at the bottom of my page:<\/p>\n<pre><code>    \n    \n    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n  \n<\/code><\/pre>\n<p>Here is my fancybox JS:<\/p>\n<pre><code>jQuery(function() {\n  $(\"a.grouped_elements\").fancybox();\n});\n<\/code><\/pre>\n<p>I have used this in previous projects are not seen this error.<\/p>\n<p>I am using Rails 3.1.13, fancybox-rails 0.2.1, JQuery 1.10.2 and have followed the instructions on https:\/\/github.com\/hecticjeff\/fancybox-rails<\/p>\n<p>Does anyone know why this might be happening?<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-29 06:17:57. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Just created a new Rails app &amp; have run into some problems with fancy-box rails and am getting this error: Uncaught TypeError: Object [object Object] has no method &#8216;fancybox&#8217; Here is the JS being loaded at the bottom of my page: Here is my fancybox JS: jQuery(function() { $(&#8220;a.grouped_elements&#8221;).fancybox(); }); I have used this in [&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-1724","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1724","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=1724"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1724\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}