Solved

Installing jQuery plugins

Posted on 2008-11-03
5
4,518 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
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…

733 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