jQuery -$ is not defined











up vote
1
down vote

favorite












<head>
<script type="text/javascript" href="{{ url('js/jquery-3.3.1.min.js') }}"></script>
</head>
<body>
<div class="container">

<div id="main" class="row">

@yield('content')

</div>

</div>
</body>


I have above layout in blade template with following content



@extends('layout.layout')

@section('content')
<!-- some HTML -->
<script>
$(document).ready(function(){
});
</script>

@endsection


I can verify by looking at source code in chrome, the jquery link is valid,



also tried moving script link to within the content,



but I am still getting Uncaught ReferenceError: $ is not defined



environment is vagrant with Laravel homestead image,



also calling jQuery function within console does show jQuery is loaded










share|improve this question
























  • From the "view page source" screen, click the link to the jQuery file and see what comes back. Is it jQuery?
    – Phil
    Nov 9 at 3:28












  • yes it returns mini-fied jQuery content /*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
    – Eudemon
    Nov 9 at 3:36












  • Well that's weird. Try replacing $(document).ready(function(){...}) with jQuery(function($){...})
    – Phil
    Nov 9 at 3:43










  • see other comment, I think it's due to IO slow on responding to mounted drive, I wonder how to fix it, I have included jQuery at work with no problem with vagrant setup
    – Eudemon
    Nov 9 at 3:48






  • 1




    Oh I found the problem is a silly mistake, I used href instead of src ... didn't realize that until you mention it, thank you so much, I wish I can give you credit
    – Eudemon
    Nov 9 at 4:14















up vote
1
down vote

favorite












<head>
<script type="text/javascript" href="{{ url('js/jquery-3.3.1.min.js') }}"></script>
</head>
<body>
<div class="container">

<div id="main" class="row">

@yield('content')

</div>

</div>
</body>


I have above layout in blade template with following content



@extends('layout.layout')

@section('content')
<!-- some HTML -->
<script>
$(document).ready(function(){
});
</script>

@endsection


I can verify by looking at source code in chrome, the jquery link is valid,



also tried moving script link to within the content,



but I am still getting Uncaught ReferenceError: $ is not defined



environment is vagrant with Laravel homestead image,



also calling jQuery function within console does show jQuery is loaded










share|improve this question
























  • From the "view page source" screen, click the link to the jQuery file and see what comes back. Is it jQuery?
    – Phil
    Nov 9 at 3:28












  • yes it returns mini-fied jQuery content /*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
    – Eudemon
    Nov 9 at 3:36












  • Well that's weird. Try replacing $(document).ready(function(){...}) with jQuery(function($){...})
    – Phil
    Nov 9 at 3:43










  • see other comment, I think it's due to IO slow on responding to mounted drive, I wonder how to fix it, I have included jQuery at work with no problem with vagrant setup
    – Eudemon
    Nov 9 at 3:48






  • 1




    Oh I found the problem is a silly mistake, I used href instead of src ... didn't realize that until you mention it, thank you so much, I wish I can give you credit
    – Eudemon
    Nov 9 at 4:14













up vote
1
down vote

favorite









up vote
1
down vote

favorite











<head>
<script type="text/javascript" href="{{ url('js/jquery-3.3.1.min.js') }}"></script>
</head>
<body>
<div class="container">

<div id="main" class="row">

@yield('content')

</div>

</div>
</body>


I have above layout in blade template with following content



@extends('layout.layout')

@section('content')
<!-- some HTML -->
<script>
$(document).ready(function(){
});
</script>

@endsection


I can verify by looking at source code in chrome, the jquery link is valid,



also tried moving script link to within the content,



but I am still getting Uncaught ReferenceError: $ is not defined



environment is vagrant with Laravel homestead image,



also calling jQuery function within console does show jQuery is loaded










share|improve this question















<head>
<script type="text/javascript" href="{{ url('js/jquery-3.3.1.min.js') }}"></script>
</head>
<body>
<div class="container">

<div id="main" class="row">

@yield('content')

</div>

</div>
</body>


I have above layout in blade template with following content



@extends('layout.layout')

@section('content')
<!-- some HTML -->
<script>
$(document).ready(function(){
});
</script>

@endsection


I can verify by looking at source code in chrome, the jquery link is valid,



also tried moving script link to within the content,



but I am still getting Uncaught ReferenceError: $ is not defined



environment is vagrant with Laravel homestead image,



also calling jQuery function within console does show jQuery is loaded







jquery laravel-blade






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 9 at 3:33

























asked Nov 9 at 3:25









Eudemon

103




103












  • From the "view page source" screen, click the link to the jQuery file and see what comes back. Is it jQuery?
    – Phil
    Nov 9 at 3:28












  • yes it returns mini-fied jQuery content /*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
    – Eudemon
    Nov 9 at 3:36












  • Well that's weird. Try replacing $(document).ready(function(){...}) with jQuery(function($){...})
    – Phil
    Nov 9 at 3:43










  • see other comment, I think it's due to IO slow on responding to mounted drive, I wonder how to fix it, I have included jQuery at work with no problem with vagrant setup
    – Eudemon
    Nov 9 at 3:48






  • 1




    Oh I found the problem is a silly mistake, I used href instead of src ... didn't realize that until you mention it, thank you so much, I wish I can give you credit
    – Eudemon
    Nov 9 at 4:14


















  • From the "view page source" screen, click the link to the jQuery file and see what comes back. Is it jQuery?
    – Phil
    Nov 9 at 3:28












  • yes it returns mini-fied jQuery content /*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
    – Eudemon
    Nov 9 at 3:36












  • Well that's weird. Try replacing $(document).ready(function(){...}) with jQuery(function($){...})
    – Phil
    Nov 9 at 3:43










  • see other comment, I think it's due to IO slow on responding to mounted drive, I wonder how to fix it, I have included jQuery at work with no problem with vagrant setup
    – Eudemon
    Nov 9 at 3:48






  • 1




    Oh I found the problem is a silly mistake, I used href instead of src ... didn't realize that until you mention it, thank you so much, I wish I can give you credit
    – Eudemon
    Nov 9 at 4:14
















From the "view page source" screen, click the link to the jQuery file and see what comes back. Is it jQuery?
– Phil
Nov 9 at 3:28






From the "view page source" screen, click the link to the jQuery file and see what comes back. Is it jQuery?
– Phil
Nov 9 at 3:28














yes it returns mini-fied jQuery content /*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
– Eudemon
Nov 9 at 3:36






yes it returns mini-fied jQuery content /*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
– Eudemon
Nov 9 at 3:36














Well that's weird. Try replacing $(document).ready(function(){...}) with jQuery(function($){...})
– Phil
Nov 9 at 3:43




Well that's weird. Try replacing $(document).ready(function(){...}) with jQuery(function($){...})
– Phil
Nov 9 at 3:43












see other comment, I think it's due to IO slow on responding to mounted drive, I wonder how to fix it, I have included jQuery at work with no problem with vagrant setup
– Eudemon
Nov 9 at 3:48




see other comment, I think it's due to IO slow on responding to mounted drive, I wonder how to fix it, I have included jQuery at work with no problem with vagrant setup
– Eudemon
Nov 9 at 3:48




1




1




Oh I found the problem is a silly mistake, I used href instead of src ... didn't realize that until you mention it, thank you so much, I wish I can give you credit
– Eudemon
Nov 9 at 4:14




Oh I found the problem is a silly mistake, I used href instead of src ... didn't realize that until you mention it, thank you so much, I wish I can give you credit
– Eudemon
Nov 9 at 4:14












1 Answer
1






active

oldest

votes

















up vote
0
down vote













<script language="JavaScript"  src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>


try running it with that






share|improve this answer





















  • that works, I guess it's IO slow at response on vagrant setup, is there anything I can do to fix that? when I tried setting type: "nfs" in homestead.yaml, the mounted folder ownership become root
    – Eudemon
    Nov 9 at 3:40













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',
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%2f53219420%2fjquery-is-not-defined%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








up vote
0
down vote













<script language="JavaScript"  src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>


try running it with that






share|improve this answer





















  • that works, I guess it's IO slow at response on vagrant setup, is there anything I can do to fix that? when I tried setting type: "nfs" in homestead.yaml, the mounted folder ownership become root
    – Eudemon
    Nov 9 at 3:40

















up vote
0
down vote













<script language="JavaScript"  src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>


try running it with that






share|improve this answer





















  • that works, I guess it's IO slow at response on vagrant setup, is there anything I can do to fix that? when I tried setting type: "nfs" in homestead.yaml, the mounted folder ownership become root
    – Eudemon
    Nov 9 at 3:40















up vote
0
down vote










up vote
0
down vote









<script language="JavaScript"  src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>


try running it with that






share|improve this answer












<script language="JavaScript"  src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>


try running it with that







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 9 at 3:37









user41758

556




556












  • that works, I guess it's IO slow at response on vagrant setup, is there anything I can do to fix that? when I tried setting type: "nfs" in homestead.yaml, the mounted folder ownership become root
    – Eudemon
    Nov 9 at 3:40




















  • that works, I guess it's IO slow at response on vagrant setup, is there anything I can do to fix that? when I tried setting type: "nfs" in homestead.yaml, the mounted folder ownership become root
    – Eudemon
    Nov 9 at 3:40


















that works, I guess it's IO slow at response on vagrant setup, is there anything I can do to fix that? when I tried setting type: "nfs" in homestead.yaml, the mounted folder ownership become root
– Eudemon
Nov 9 at 3:40






that works, I guess it's IO slow at response on vagrant setup, is there anything I can do to fix that? when I tried setting type: "nfs" in homestead.yaml, the mounted folder ownership become root
– Eudemon
Nov 9 at 3:40




















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53219420%2fjquery-is-not-defined%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

How to pass form data using jquery Ajax to insert data in database?

National Museum of Racing and Hall of Fame

Guess what letter conforming each word