Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery link for bootstrap

I have noticed that the bootstrap provides a jQuery link that you can use to run the JavaScript files. What I would like to know is if it matters what jQuery link you use.

Currently, the code provided by the bootstrap site is:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>

Would it hurt if I used these links below to replace the above link:

<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
like image 712
Jbro Avatar asked Apr 16 '15 04:04

Jbro


People also ask

Can I use bootstrap with jQuery?

Bootstrap 5 is designed to be used without jQuery, but it's still possible to use our components with jQuery. If Bootstrap detects jQuery in the window object it'll add all of our components in jQuery's plugin system; this means you'll be able to do $('[data-bs-toggle="tooltip"]').tooltip() to enable tooltips.

What is the link for bootstrap?

The files can be downloaded from the following links: Bootstrap 4: https://getbootstrap.com/docs/4.3/getting-started/download/ Bootstrap 5: https://v5.getbootstrap.com/docs/5.0/getting-started/download/

Does bootstrap 4 require jQuery?

Bootstrap 4 use jQuery and Popper.js for JavaScript components (like modals, tooltips, popovers etc). However, if you just use the CSS part of Bootstrap, you don't need them.

What is BootstrapCDN link?

Bootstrap CDN is a free content delivery network that helps us to quickly load Bootstrap CSS, Javascript, and jQuery libraries on our projects to make projects responsive, mobile friendly, and attractive.


2 Answers

It will not create any issue as jQuery library version is same. as per your link both files version is same that means files is same but loads from different server.

Main thing is you need to use jQuery library suggested by bootstrap

jQuery (necessary for Bootstrap's JavaScript plugins) .

you can download that files to your local project folder and use in project it will work fine.

jQuery Migrate Plugin

<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>

jQuery Migrate Plugin simplify the transition from older versions of jQuery. The plugin restores deprecated features and behaviors so that older code will still run properly on jQuery 1.9 and later.

like image 198
Nishit Maheta Avatar answered Sep 28 '22 02:09

Nishit Maheta


These two file are exactly the same therefore you should not see any difference.

like image 20
wael101 Avatar answered Sep 28 '22 03:09

wael101