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;








1















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..










share|improve this question



















  • 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


















1















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..










share|improve this question



















  • 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














1












1








1








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..










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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













  • 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








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













1 Answer
1






active

oldest

votes


















1














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() ...);






share|improve this answer






















    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
    );



    );













    draft saved

    draft discarded


















    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









    1














    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() ...);






    share|improve this answer



























      1














      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() ...);






      share|improve this answer

























        1












        1








        1







        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() ...);






        share|improve this answer













        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() ...);







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 26 at 17:57









        MarkMark

        277 bronze badges




        277 bronze badges


















            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.



















            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해