{"id":3133,"date":"2014-03-16T22:56:22","date_gmt":"2014-03-16T22:56:22","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/16\/queryloader-isnt-working-collection-of-common-programming-errors-2\/"},"modified":"2014-03-16T22:56:22","modified_gmt":"2014-03-16T22:56:22","slug":"queryloader-isnt-working-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/16\/queryloader-isnt-working-collection-of-common-programming-errors-2\/","title":{"rendered":"QueryLoader isn&#180;t working-Collection of common programming errors"},"content":{"rendered":"<p>I downloaded the QueryLoader plugin from http:\/\/www.gayadesign.com\/diy\/queryloader-preload-your-website-in-style\/ to preload the site before showing the content. However, the Chrome console shows the following message when I access to:<\/p>\n<p>Uncaught TypeError: Cannot call method &#8216;toLowerCase&#8217; of undefined<\/p>\n<p>Here&#8217;s the code:<\/p>\n<p>The problem is in the .toLowerCase() line:<\/p>\n<pre><code>getImages: function(selector) {\n    var everything = $(selector).find(\"*:not(script)\").each(function() {\n        var url = \"\";\n\n        if ($(this).css(\"background-image\") != \"none\") {\n            var url = $(this).css(\"background-image\");\n        } else if (typeof($(this).attr(\"src\")) != \"undefined\" &amp;&amp; $(this).attr(\"tagName\").toLowerCase() == \"img\") {\n            var url = $(this).attr(\"src\");\n        }\n\n        url = url.replace(\"url(\\\"\", \"\");\n        url = url.replace(\"url(\", \"\");\n        url = url.replace(\"\\\")\", \"\");\n        url = url.replace(\")\", \"\");\n\n        if (url.length &gt; 0) {\n            QueryLoader.items.push(url);\n        }\n    });\n},\n<\/code><\/pre>\n<p>Anybody knows the reason why this message appears and what it means?<\/p>\n<p>Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I downloaded the QueryLoader plugin from http:\/\/www.gayadesign.com\/diy\/queryloader-preload-your-website-in-style\/ to preload the site before showing the content. However, the Chrome console shows the following message when I access to: Uncaught TypeError: Cannot call method &#8216;toLowerCase&#8217; of undefined Here&#8217;s the code: The problem is in the .toLowerCase() line: getImages: function(selector) { var everything = $(selector).find(&#8220;*:not(script)&#8221;).each(function() { var url [&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-3133","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3133","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=3133"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3133\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}