Solved

Installing jQuery plugins

Posted on 2008-11-03
5
4,517 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to hide the rows in Table when the value is empty ? 4 50
How to make a moving character 3 68
Function after success of Jquery/AJAX action 9 28
jquery tab header text 1 23
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
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 …
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…

856 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