Uncaught TypeError: a.indexOf is not a function [PRELOADER]Is there an “exists” function for jQuery?var functionName = function() vs function functionName() Preloading images with jQuerySet a default parameter value for a JavaScript functionHow can I remove a style added with .css() function?Is there a standard function to check for null, undefined, or blank variables in JavaScript?Pure JavaScript equivalent of jQuery's $.ready() - how to call a function when the page/DOM is ready for itxing / wysihtml5 unescapes < and >Cannot display HTML stringPreloader JS Loading Gif Does Not Disappear if User Has Javascript Disabled
Where to place an artificial gland in the human body?
Strange Cron Job takes up 100% of CPU Ubuntu 18 LTS Server
Why isnt the output showing k1, k2, k3?
How acidic does a mixture have to be for milk to curdle?
Expansion with *.txt in the shell doesn't work if no .txt file exists
How can I stop myself from micromanaging other PCs' actions?
Is it normal practice to screen share with a client?
Problem in styling a monochrome plot
Examples of simultaneous independent breakthroughs
Is there a reason why I should not use the HaveIBeenPwned API to warn users about exposed passwords?
Why can't my huge trees be chopped down?
What is "I bet" in German?
Is it legal to use cash pulled from a credit card to pay the monthly payment on that credit card?
How can I receive packages while in France?
How do I stop my characters falling in love?
Why was Sauron preparing for war instead of trying to find the ring?
Request for a Latin phrase as motto "God is highest/supreme"
How can I create a pattern of parallel lines that are increasing in distance in Photoshop / Illustrator?
Singapore to Sydney to Canberra: where do we clear customs
Trapped in an ocean Temple in Minecraft?
Is there anything wrong with Thrawn?
Binomial analogue of Riemann sum for definite integral
Convert a string like 4h53m12s to a total number of seconds in JavaScript
Why are off grid solar setups only 12, 24, 48 VDC?
Uncaught TypeError: a.indexOf is not a function [PRELOADER]
Is there an “exists” function for jQuery?var functionName = function() vs function functionName() Preloading images with jQuerySet a default parameter value for a JavaScript functionHow can I remove a style added with .css() function?Is there a standard function to check for null, undefined, or blank variables in JavaScript?Pure JavaScript equivalent of jQuery's $.ready() - how to call a function when the page/DOM is ready for itxing / wysihtml5 unescapes < and >Cannot display HTML stringPreloader JS Loading Gif Does Not Disappear if User Has Javascript Disabled
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm trying to add a simple preloader to my website and I get this error in the console Uncaught TypeError: a.indexOf is not a function
HTML index.html
<html class="js">
<head>
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<script type="text/javascript">
jQuery(document).ready(function($)
$(window).load(function()
$('#preloader').fadeOut('slow',function()$(this).remove(););
);
);
</script>
<div id="preloader"></div>
</body>
</html>
CSS style.css
.js div#preloader
position: fixed;
left: 0;
top: 0;
z-index: 999;
width: 100%;
height: 100%;
overflow: visible;
background: #143441 url('assets/img/loader.gif') no-repeat center center;
This only shows a gif that is constantly rotating and after the end of loading..
javascript jquery html css ajax
add a comment |
I'm trying to add a simple preloader to my website and I get this error in the console Uncaught TypeError: a.indexOf is not a function
HTML index.html
<html class="js">
<head>
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<script type="text/javascript">
jQuery(document).ready(function($)
$(window).load(function()
$('#preloader').fadeOut('slow',function()$(this).remove(););
);
);
</script>
<div id="preloader"></div>
</body>
</html>
CSS style.css
.js div#preloader
position: fixed;
left: 0;
top: 0;
z-index: 999;
width: 100%;
height: 100%;
overflow: visible;
background: #143441 url('assets/img/loader.gif') no-repeat center center;
This only shows a gif that is constantly rotating and after the end of loading..
javascript jquery html css ajax
1
check the network tab of your developer tools to verify that your JQuery script reference is resolving properly.
– Scott Marcus
Mar 26 at 17:34
I now got this in consolejquery.min.js:4 Uncaught TypeError: a.indexOf is not a function at r.fn.init.r.fn.load (jquery.min.js:4) at HTMLDocument.<anonymous> (index.html:23) at j (jquery.min.js:2) at k (jquery.min.js:2)
– Mark
Mar 26 at 17:38
add a comment |
I'm trying to add a simple preloader to my website and I get this error in the console Uncaught TypeError: a.indexOf is not a function
HTML index.html
<html class="js">
<head>
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<script type="text/javascript">
jQuery(document).ready(function($)
$(window).load(function()
$('#preloader').fadeOut('slow',function()$(this).remove(););
);
);
</script>
<div id="preloader"></div>
</body>
</html>
CSS style.css
.js div#preloader
position: fixed;
left: 0;
top: 0;
z-index: 999;
width: 100%;
height: 100%;
overflow: visible;
background: #143441 url('assets/img/loader.gif') no-repeat center center;
This only shows a gif that is constantly rotating and after the end of loading..
javascript jquery html css ajax
I'm trying to add a simple preloader to my website and I get this error in the console Uncaught TypeError: a.indexOf is not a function
HTML index.html
<html class="js">
<head>
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<script type="text/javascript">
jQuery(document).ready(function($)
$(window).load(function()
$('#preloader').fadeOut('slow',function()$(this).remove(););
);
);
</script>
<div id="preloader"></div>
</body>
</html>
CSS style.css
.js div#preloader
position: fixed;
left: 0;
top: 0;
z-index: 999;
width: 100%;
height: 100%;
overflow: visible;
background: #143441 url('assets/img/loader.gif') no-repeat center center;
This only shows a gif that is constantly rotating and after the end of loading..
javascript jquery html css ajax
javascript jquery html css ajax
edited Mar 26 at 17:51
Mark
asked Mar 26 at 17:31
MarkMark
277 bronze badges
277 bronze badges
1
check the network tab of your developer tools to verify that your JQuery script reference is resolving properly.
– Scott Marcus
Mar 26 at 17:34
I now got this in consolejquery.min.js:4 Uncaught TypeError: a.indexOf is not a function at r.fn.init.r.fn.load (jquery.min.js:4) at HTMLDocument.<anonymous> (index.html:23) at j (jquery.min.js:2) at k (jquery.min.js:2)
– Mark
Mar 26 at 17:38
add a comment |
1
check the network tab of your developer tools to verify that your JQuery script reference is resolving properly.
– Scott Marcus
Mar 26 at 17:34
I now got this in consolejquery.min.js:4 Uncaught TypeError: a.indexOf is not a function at r.fn.init.r.fn.load (jquery.min.js:4) at HTMLDocument.<anonymous> (index.html:23) at j (jquery.min.js:2) at k (jquery.min.js:2)
– Mark
Mar 26 at 17:38
1
1
check the network tab of your developer tools to verify that your JQuery script reference is resolving properly.
– Scott Marcus
Mar 26 at 17:34
check the network tab of your developer tools to verify that your JQuery script reference is resolving properly.
– Scott Marcus
Mar 26 at 17:34
I now got this in console
jquery.min.js:4 Uncaught TypeError: a.indexOf is not a function at r.fn.init.r.fn.load (jquery.min.js:4) at HTMLDocument.<anonymous> (index.html:23) at j (jquery.min.js:2) at k (jquery.min.js:2)– Mark
Mar 26 at 17:38
I now got this in console
jquery.min.js:4 Uncaught TypeError: a.indexOf is not a function at r.fn.init.r.fn.load (jquery.min.js:4) at HTMLDocument.<anonymous> (index.html:23) at j (jquery.min.js:2) at k (jquery.min.js:2)– Mark
Mar 26 at 17:38
add a comment |
1 Answer
1
active
oldest
votes
I searched a little and found a solution. The problem is in .load event aliase, it needs to be replaced .on
Example:
$(window).load(function()...);
becomes:
$(window).on('load', function() ...);
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55363084%2funcaught-typeerror-a-indexof-is-not-a-function-preloader%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I searched a little and found a solution. The problem is in .load event aliase, it needs to be replaced .on
Example:
$(window).load(function()...);
becomes:
$(window).on('load', function() ...);
add a comment |
I searched a little and found a solution. The problem is in .load event aliase, it needs to be replaced .on
Example:
$(window).load(function()...);
becomes:
$(window).on('load', function() ...);
add a comment |
I searched a little and found a solution. The problem is in .load event aliase, it needs to be replaced .on
Example:
$(window).load(function()...);
becomes:
$(window).on('load', function() ...);
I searched a little and found a solution. The problem is in .load event aliase, it needs to be replaced .on
Example:
$(window).load(function()...);
becomes:
$(window).on('load', function() ...);
answered Mar 26 at 17:57
MarkMark
277 bronze badges
277 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55363084%2funcaught-typeerror-a-indexof-is-not-a-function-preloader%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
check the network tab of your developer tools to verify that your JQuery script reference is resolving properly.
– Scott Marcus
Mar 26 at 17:34
I now got this in console
jquery.min.js:4 Uncaught TypeError: a.indexOf is not a function at r.fn.init.r.fn.load (jquery.min.js:4) at HTMLDocument.<anonymous> (index.html:23) at j (jquery.min.js:2) at k (jquery.min.js:2)– Mark
Mar 26 at 17:38