Bootstrap is only working with external links, not with the downloaded version
up vote
-1
down vote
favorite
When I use Bootstrap with external links, e.g.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
it is working. But when I download Bootstrap and jQuery and link it within my folders like this:
<link rel="stylesheet" type="text/css" media="screen" href="./css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="./css/myStyle.css" />
<script src="./js/bootstrap.min.js"></script>
<script src="./js/jquery.min.js"></script>
it is not working. The links are correct, "myStyle.css" is working fine and I double-checked the links and names.
My folder structure:
index.html
/css/all the bootstrap .css files
/js/all the bootstrap + jquery js files
What am I doing wrong?
javascript jquery css bootstrap-4
New contributor
add a comment |
up vote
-1
down vote
favorite
When I use Bootstrap with external links, e.g.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
it is working. But when I download Bootstrap and jQuery and link it within my folders like this:
<link rel="stylesheet" type="text/css" media="screen" href="./css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="./css/myStyle.css" />
<script src="./js/bootstrap.min.js"></script>
<script src="./js/jquery.min.js"></script>
it is not working. The links are correct, "myStyle.css" is working fine and I double-checked the links and names.
My folder structure:
index.html
/css/all the bootstrap .css files
/js/all the bootstrap + jquery js files
What am I doing wrong?
javascript jquery css bootstrap-4
New contributor
Are there any JS errors you see in the console? Just a wild guess, can you put your script tag for JQuery first and then the bootstrap script tag?
– Gurtej Singh
Nov 20 at 22:14
4
That's not a wild guess. Must be ordered that way. jQuery.js has to load before any other plugins or code that depends on it
– charlietfl
Nov 20 at 22:16
Sounds improbable. Are you sure the folder is/js/
and is at the same level as/css/
? If you load the resulting link in the browser, does it show the js file contents? Do you have any wild.htaccess
rules? Any errors in console? All of your tags are wrong. You don't experts on any of the listed technologies. You need expert on whatever technology your server is running on:apache
,apache-config
or mabyehttpserver
. Perhapsunix
orwindows-server
?
– Andrei Gheorghiu
Nov 20 at 22:17
What's the path of the current page? Also, check network in dev tools to see if you're getting 404s. Check to see how the page is actually loading those relative paths.
– Joseph
Nov 20 at 22:19
just remove dot(. before the URL and also while running chrome check what the source url is generated ,so can you can solve that)
– Yash Soni
Nov 21 at 7:53
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
When I use Bootstrap with external links, e.g.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
it is working. But when I download Bootstrap and jQuery and link it within my folders like this:
<link rel="stylesheet" type="text/css" media="screen" href="./css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="./css/myStyle.css" />
<script src="./js/bootstrap.min.js"></script>
<script src="./js/jquery.min.js"></script>
it is not working. The links are correct, "myStyle.css" is working fine and I double-checked the links and names.
My folder structure:
index.html
/css/all the bootstrap .css files
/js/all the bootstrap + jquery js files
What am I doing wrong?
javascript jquery css bootstrap-4
New contributor
When I use Bootstrap with external links, e.g.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
it is working. But when I download Bootstrap and jQuery and link it within my folders like this:
<link rel="stylesheet" type="text/css" media="screen" href="./css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="./css/myStyle.css" />
<script src="./js/bootstrap.min.js"></script>
<script src="./js/jquery.min.js"></script>
it is not working. The links are correct, "myStyle.css" is working fine and I double-checked the links and names.
My folder structure:
index.html
/css/all the bootstrap .css files
/js/all the bootstrap + jquery js files
What am I doing wrong?
javascript jquery css bootstrap-4
javascript jquery css bootstrap-4
New contributor
New contributor
edited Nov 22 at 9:20
Paolo Forgia
4,37962644
4,37962644
New contributor
asked Nov 20 at 22:11
Mievo
4
4
New contributor
New contributor
Are there any JS errors you see in the console? Just a wild guess, can you put your script tag for JQuery first and then the bootstrap script tag?
– Gurtej Singh
Nov 20 at 22:14
4
That's not a wild guess. Must be ordered that way. jQuery.js has to load before any other plugins or code that depends on it
– charlietfl
Nov 20 at 22:16
Sounds improbable. Are you sure the folder is/js/
and is at the same level as/css/
? If you load the resulting link in the browser, does it show the js file contents? Do you have any wild.htaccess
rules? Any errors in console? All of your tags are wrong. You don't experts on any of the listed technologies. You need expert on whatever technology your server is running on:apache
,apache-config
or mabyehttpserver
. Perhapsunix
orwindows-server
?
– Andrei Gheorghiu
Nov 20 at 22:17
What's the path of the current page? Also, check network in dev tools to see if you're getting 404s. Check to see how the page is actually loading those relative paths.
– Joseph
Nov 20 at 22:19
just remove dot(. before the URL and also while running chrome check what the source url is generated ,so can you can solve that)
– Yash Soni
Nov 21 at 7:53
add a comment |
Are there any JS errors you see in the console? Just a wild guess, can you put your script tag for JQuery first and then the bootstrap script tag?
– Gurtej Singh
Nov 20 at 22:14
4
That's not a wild guess. Must be ordered that way. jQuery.js has to load before any other plugins or code that depends on it
– charlietfl
Nov 20 at 22:16
Sounds improbable. Are you sure the folder is/js/
and is at the same level as/css/
? If you load the resulting link in the browser, does it show the js file contents? Do you have any wild.htaccess
rules? Any errors in console? All of your tags are wrong. You don't experts on any of the listed technologies. You need expert on whatever technology your server is running on:apache
,apache-config
or mabyehttpserver
. Perhapsunix
orwindows-server
?
– Andrei Gheorghiu
Nov 20 at 22:17
What's the path of the current page? Also, check network in dev tools to see if you're getting 404s. Check to see how the page is actually loading those relative paths.
– Joseph
Nov 20 at 22:19
just remove dot(. before the URL and also while running chrome check what the source url is generated ,so can you can solve that)
– Yash Soni
Nov 21 at 7:53
Are there any JS errors you see in the console? Just a wild guess, can you put your script tag for JQuery first and then the bootstrap script tag?
– Gurtej Singh
Nov 20 at 22:14
Are there any JS errors you see in the console? Just a wild guess, can you put your script tag for JQuery first and then the bootstrap script tag?
– Gurtej Singh
Nov 20 at 22:14
4
4
That's not a wild guess. Must be ordered that way. jQuery.js has to load before any other plugins or code that depends on it
– charlietfl
Nov 20 at 22:16
That's not a wild guess. Must be ordered that way. jQuery.js has to load before any other plugins or code that depends on it
– charlietfl
Nov 20 at 22:16
Sounds improbable. Are you sure the folder is
/js/
and is at the same level as /css/
? If you load the resulting link in the browser, does it show the js file contents? Do you have any wild .htaccess
rules? Any errors in console? All of your tags are wrong. You don't experts on any of the listed technologies. You need expert on whatever technology your server is running on: apache
, apache-config
or mabye httpserver
. Perhaps unix
or windows-server
?– Andrei Gheorghiu
Nov 20 at 22:17
Sounds improbable. Are you sure the folder is
/js/
and is at the same level as /css/
? If you load the resulting link in the browser, does it show the js file contents? Do you have any wild .htaccess
rules? Any errors in console? All of your tags are wrong. You don't experts on any of the listed technologies. You need expert on whatever technology your server is running on: apache
, apache-config
or mabye httpserver
. Perhaps unix
or windows-server
?– Andrei Gheorghiu
Nov 20 at 22:17
What's the path of the current page? Also, check network in dev tools to see if you're getting 404s. Check to see how the page is actually loading those relative paths.
– Joseph
Nov 20 at 22:19
What's the path of the current page? Also, check network in dev tools to see if you're getting 404s. Check to see how the page is actually loading those relative paths.
– Joseph
Nov 20 at 22:19
just remove dot(. before the URL and also while running chrome check what the source url is generated ,so can you can solve that)
– Yash Soni
Nov 21 at 7:53
just remove dot(. before the URL and also while running chrome check what the source url is generated ,so can you can solve that)
– Yash Soni
Nov 21 at 7:53
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
you need to add jQuery before bootstrap.min.js
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/myStyle.css" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
add a comment |
up vote
-1
down vote
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/myStyle.css" />
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.min.js"></script>
New contributor
4
it would be better if you added an explanation to the answer.
– Germano Plebani
Nov 21 at 8:13
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
you need to add jQuery before bootstrap.min.js
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/myStyle.css" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
add a comment |
up vote
0
down vote
you need to add jQuery before bootstrap.min.js
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/myStyle.css" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
add a comment |
up vote
0
down vote
up vote
0
down vote
you need to add jQuery before bootstrap.min.js
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/myStyle.css" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
you need to add jQuery before bootstrap.min.js
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/myStyle.css" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
answered Nov 22 at 9:51
Saurabh Mistry
2,7791726
2,7791726
add a comment |
add a comment |
up vote
-1
down vote
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/myStyle.css" />
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.min.js"></script>
New contributor
4
it would be better if you added an explanation to the answer.
– Germano Plebani
Nov 21 at 8:13
add a comment |
up vote
-1
down vote
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/myStyle.css" />
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.min.js"></script>
New contributor
4
it would be better if you added an explanation to the answer.
– Germano Plebani
Nov 21 at 8:13
add a comment |
up vote
-1
down vote
up vote
-1
down vote
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/myStyle.css" />
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.min.js"></script>
New contributor
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/myStyle.css" />
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.min.js"></script>
New contributor
New contributor
answered Nov 21 at 6:05
Cyril Marvin Raña
11
11
New contributor
New contributor
4
it would be better if you added an explanation to the answer.
– Germano Plebani
Nov 21 at 8:13
add a comment |
4
it would be better if you added an explanation to the answer.
– Germano Plebani
Nov 21 at 8:13
4
4
it would be better if you added an explanation to the answer.
– Germano Plebani
Nov 21 at 8:13
it would be better if you added an explanation to the answer.
– Germano Plebani
Nov 21 at 8:13
add a comment |
Mievo is a new contributor. Be nice, and check out our Code of Conduct.
Mievo is a new contributor. Be nice, and check out our Code of Conduct.
Mievo is a new contributor. Be nice, and check out our Code of Conduct.
Mievo is a new contributor. Be nice, and check out our Code of Conduct.
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%2f53402375%2fbootstrap-is-only-working-with-external-links-not-with-the-downloaded-version%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
Are there any JS errors you see in the console? Just a wild guess, can you put your script tag for JQuery first and then the bootstrap script tag?
– Gurtej Singh
Nov 20 at 22:14
4
That's not a wild guess. Must be ordered that way. jQuery.js has to load before any other plugins or code that depends on it
– charlietfl
Nov 20 at 22:16
Sounds improbable. Are you sure the folder is
/js/
and is at the same level as/css/
? If you load the resulting link in the browser, does it show the js file contents? Do you have any wild.htaccess
rules? Any errors in console? All of your tags are wrong. You don't experts on any of the listed technologies. You need expert on whatever technology your server is running on:apache
,apache-config
or mabyehttpserver
. Perhapsunix
orwindows-server
?– Andrei Gheorghiu
Nov 20 at 22:17
What's the path of the current page? Also, check network in dev tools to see if you're getting 404s. Check to see how the page is actually loading those relative paths.
– Joseph
Nov 20 at 22:19
just remove dot(. before the URL and also while running chrome check what the source url is generated ,so can you can solve that)
– Yash Soni
Nov 21 at 7:53