{"id":1345,"date":"2022-08-30T15:15:45","date_gmt":"2022-08-30T15:15:45","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/13\/jquery-error-using-nivoslider-and-symphony-cms-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:15:45","modified_gmt":"2022-08-30T15:15:45","slug":"jquery-error-using-nivoslider-and-symphony-cms-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/jquery-error-using-nivoslider-and-symphony-cms-collection-of-common-programming-errors\/","title":{"rendered":"Jquery error using nivoSlider and symphony-cms-Collection of common programming errors"},"content":{"rendered":"<p>I embedded the nivo slider:<\/p>\n<pre><code>\n\n  \n  \n    <img decoding=\"async\" src=\"http:\/\/amarilaw.com\/test\/image\/2\/877\/317\/5\/0\/images\/lighthouse.jpg\" \/>\n    <img decoding=\"async\" src=\"http:\/\/amarilaw.com\/test\/image\/2\/877\/317\/5\/0\/images\/main-image2.png\" \/>\n  \n\n<\/code><\/pre>\n<p>Then add the following javascript:<\/p>\n<pre><code> \n\n$(window).load(function() {\n    $('#slider').nivoSlider({\n        effect: 'random', \n        pauseTime: 4000\n     });\n});\n\n<\/code><\/pre>\n<p>(jquery is already loaded in the header, so I didn&#8217;t do it here)<\/p>\n<p>However, I get the following error:<\/p>\n<pre><code>Uncaught TypeError: Object [object Object] has no method 'nivoSlider' \/test\/:76\n(anonymous function) \/test\/:76\nf.event.dispatch jquery-1.7.2.min.js:3\nf.event.add.h.handle.i\n<\/code><\/pre>\n<p>There are a few other postings on this site of people getting the same error. I have tried all of the following remedies, without success:<\/p>\n<ul>\n<li>making sure jquery isn&#8217;t loaded twice on the page<\/li>\n<li>changing window.load to document.ready<\/li>\n<li>checking that all file paths to js files are correct<\/li>\n<li>Accepting Jesus into my heart<\/li>\n<\/ul>\n<p>Anyone got an idea? Here is the link, you&#8217;ll have to enter the login info below to see it: [1] [1]: http:\/\/amarilaw.com\/test<\/p>\n<p>user: betatest<\/p>\n<p>pass: pleasework<\/p>\n<ol>\n<li>\n<p>You are calling your jQuery.min.js file more than once, even though you said you made sue of it.Please see lines <code>6<\/code> and <code>108<\/code>. You&#8217;ll notice the same file, twice.<\/p>\n<p>Because of this, the function is not available to jQuery at the scope of the load, making it impossible to load the function.<\/p>\n<p>Do two things here:<\/p>\n<h2>1<\/h2>\n<p>Take all those random tags you have strewn all about the document and move them into the <code>bottom of the document body<\/code>.<\/p>\n<h2>2<\/h2>\n<p>Remove the jQuery.min.js file located at line #108<\/p>\n<h2>3<\/h2>\n<p>????<\/p>\n<h2>4<\/h2>\n<p>Profit.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-13 09:48:25. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I embedded the nivo slider: Then add the following javascript: $(window).load(function() { $(&#8216;#slider&#8217;).nivoSlider({ effect: &#8216;random&#8217;, pauseTime: 4000 }); }); (jquery is already loaded in the header, so I didn&#8217;t do it here) However, I get the following error: Uncaught TypeError: Object [object Object] has no method &#8216;nivoSlider&#8217; \/test\/:76 (anonymous function) \/test\/:76 f.event.dispatch jquery-1.7.2.min.js:3 f.event.add.h.handle.i There [&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-1345","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1345","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=1345"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1345\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}