Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 784
Patrick Guinness Avatar asked Nov 07 '12 16:11

Patrick Guinness


1 Answers

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.

like image 183
Selvakumar Arumugam Avatar answered Nov 12 '22 20:11

Selvakumar Arumugam