Solved

Installing jQuery plugins

Posted on 2008-11-03
5
4,515 Views
Last Modified: 2010-04-21
Hi,
I would like to install the cookie plugin from http://plugins.jquery.com/project/cookie, but I am loading jQuery from Google http://code.google.com/apis/ajaxlibs/documentation/index.html#jquery, so is there a way to use the cookie plugin while still using googles jQuery?
0
Comment
Question by:Daduck
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:dwaynecharrington
ID: 22865846
You might be happy to know that jQuery plugins are simply a matter of including the Javascript file for it.

<script src="jquery.cookie.js"></script>

Make sure you include the script after you've included jQuery. So in order of preference jQuery should be included first and then the plugin afterwards.
0
 
LVL 6

Accepted Solution

by:
dwaynecharrington earned 500 total points
ID: 22865852
And if you're including jQuery from Google it's absolutely fine. As long as jQuery is being included okay, it's all good. Just include any jQuery plugin as you would jQuery itself!
0
 

Author Closing Comment

by:Daduck
ID: 31512631
Thank you very much, it worked wonders.
0
 

Expert Comment

by:eliuha
ID: 24949645
so what does it mean , when after doing the specified, i get
---------
function (selector, context) {
    return new (jQuery.fn.init)(selector, context);
}
--------

instead of getting a cookie value ( var nFrom = $.cookie('nId'); )
0
 

Expert Comment

by:eliuha
ID: 24950020
nevermind,
a complete reload of a page (ctrl +f5) fixed it
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Jquery autocomplete 10 68
combining jquery scripts 3 21
JS Plugin Chaining 2 32
form button worked now it doesnt anymore 9 41
There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now