简体   繁体   中英

By including jQuery and jQuery UI, Am I loading jQuery twice?

I have been playing around with PHP and JavaScript and jQuery and installed a couple of jQuery plugins. Now in my header I have:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

Is this loading two different things? Or can I get rid of one?

No you are not loading twice. They are 2 different libraries for different purpose.

http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js is the jQuery library mainly for document traversing, event handling, animating, and Ajax interactions. Check their website documentation for information.

http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js is the jQuery UI library that contains the widgets like tabs/accordian/dialog and functions like animate/draggable/sortable and more. Check out jQuery UI website for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM