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
jquery laravel-blade
|
show 6 more comments
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
jquery laravel-blade
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(){...})withjQuery(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 usedhrefinstead ofsrc... 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
|
show 6 more comments
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
jquery laravel-blade
<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
jquery laravel-blade
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(){...})withjQuery(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 usedhrefinstead ofsrc... 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
|
show 6 more comments
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(){...})withjQuery(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 usedhrefinstead ofsrc... 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
|
show 6 more comments
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
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 settingtype: "nfs"in homestead.yaml, the mounted folder ownership become root
– Eudemon
Nov 9 at 3:40
add a comment |
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
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 settingtype: "nfs"in homestead.yaml, the mounted folder ownership become root
– Eudemon
Nov 9 at 3:40
add a comment |
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
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 settingtype: "nfs"in homestead.yaml, the mounted folder ownership become root
– Eudemon
Nov 9 at 3:40
add a comment |
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
<script language="JavaScript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
try running it with that
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 settingtype: "nfs"in homestead.yaml, the mounted folder ownership become root
– Eudemon
Nov 9 at 3:40
add a comment |
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 settingtype: "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
add a comment |
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%2f53219420%2fjquery-is-not-defined%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
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(){...})withjQuery(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
hrefinstead ofsrc... 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