Reputation: 5
If I found any kind of Jquery plugin on the internet, do I need to download and install full Jquery framework to make the plugin work?
Upvotes: 0
Views: 1679
Reputation: 76577
jQuery plugins typically rely on the jQuery framework, so you will need to include it in your project (in the HEAD
section of your application / page) using one of the following methods:
Download the Source from jQuery.com and include the file in your project:
<script type="text/javascript" src="jquery.js"></script>
Using a hosted version via a CDN: (Google Example shown below)
<script type='text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
Learn more about Downloading and Using jQuery
Upvotes: 2
Reputation: 7141
Nope, just include a script tag sourcing jQuery on the page. Make sure you know which version of jQuery is applicable.
You could even just source a Content Delivery Network.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="path/to/plugin"></script>
Upvotes: 0
Reputation: 69915
You just have to include the jQuery core js
file into the page you want to use it.
CDN HOSTED JQUERY
A number of large enterprises provide hosted copies of jQuery on existing CDN networks that are available for public use. Below are links to the CDN-hosted copies of jQuery that you may hotlink to.
Google Ajax API CDN (Also supports SSL via HTTPS) http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
Google Ajax CDN Documentation Microsoft CDN (Also supports SSL via HTTPS) http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js
Ajax CDN Announcement, Microsoft Ajax CDN Documentation jQuery CDN (via Media Temple) http://code.jquery.com/jquery-1.7.1.min.js (Minified version)
http://code.jquery.com/jquery-1.7.1.js (Source version)
Upvotes: 0
Reputation: 2726
Yes, you need the jQuery library in order to use jQuery plugins. You can grab a Google hosted version of jQuery, so you don't have to host the file, and chances are that other sites people use already have it cached.
https://code.google.com/apis/libraries/devguide.html#jquery
Upvotes: 0
Reputation: 218960
Depends on what you mean by "install." There's nothing to install on your computer, no. But your web page needs to load the jQuery library before it loads the plugin.
You don't necessarily need to serve the jQuery library yourself. Your page could point to a CDN copy of the jQuery library.
You'll also want to check with the plugin you're using to make sure you use the correct version of jQuery. It might not work with versions earlier than a given number, or conversely it might not have been tested/validated on versions later than a given number.
Upvotes: 0
Reputation: 7802
you'll need to include the jquery framework when you use the plugin.
you can reference it from a cdn to avoid having to "install" it.
jquery cdn: http://docs.jquery.com/Downloading_jQuery#CDN_Hosted_jQuery
Upvotes: 0