jQuery: The Write Less, Do More JavaScript Library

Initial Setup

View: New views
8 Messages — Rating Filter:   Alert me  

Initial Setup

by Andrew243 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I'm new to JavaScript -- and cannot get jQuery to work (unless I
access http://code.jquery.com/jquery-latest.js)

Is this permissible, or do I have to download jquery.js to my server?

If not, I have other questions:
* my hosting service does doesn't have gzip compression enabled --
what file do I need to install on my server if I don't have GZIP
available?
* how can I extract  that file (jquery.js?) from jquery-1.3.2.js.txt?
(looked for GZipper, but from what I can see that's Mac s/w and I'm
running windows)

Please make you answer really simple, as I'm really lost here!

Re: Initial Setup

by Charlie Griefer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jul 3, 2009 at 8:51 AM, Andrew <mail@...> wrote:

I'm new to JavaScript -- and cannot get jQuery to work (unless I
access http://code.jquery.com/jquery-latest.js)

Is this permissible, or do I have to download jquery.js to my server?

If not, I have other questions:
* my hosting service does doesn't have gzip compression enabled --
what file do I need to install on my server if I don't have GZIP
available?
* how can I extract  that file (jquery.js?) from jquery-1.3.2.js.txt?
(looked for GZipper, but from what I can see that's Mac s/w and I'm
running windows)

Please make you answer really simple, as I'm really lost here!


jquery-1.3.2.js.txt just needs to be renamed to jquery.1.3.2.js (just remove the '.txt').  Or, better yet (IMO), rename it to jquery-latest.js (this way when you download a new version you don't have to update code.

--
I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.

Re: Initial Setup

by Karl Swedberg-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It's probably not a good idea to use the one at code.jquery.com. You could use the Google CDN version, though:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>


--Karl

____________
Karl Swedberg




On Jul 3, 2009, at 11:51 AM, Andrew wrote:


I'm new to JavaScript -- and cannot get jQuery to work (unless I
access http://code.jquery.com/jquery-latest.js)

Is this permissible, or do I have to download jquery.js to my server?

If not, I have other questions:
* my hosting service does doesn't have gzip compression enabled --
what file do I need to install on my server if I don't have GZIP
available?
* how can I extract  that file (jquery.js?) from jquery-1.3.2.js.txt?
(looked for GZipper, but from what I can see that's Mac s/w and I'm
running windows)

Please make you answer really simple, as I'm really lost here!


Re: Initial Setup

by Pyrolupus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Fri, Jul 3, 2009 at 8:51 AM, Andrew <m...@...> wrote:
> I'm new to JavaScript -- and cannot get jQuery to work (unless I
> access http://code.jquery.com/jquery-latest.js)
> ...
> * my hosting service does doesn't have gzip compression enabled --
> what file do I need to install on my server if I don't have GZIP
> available?

If you want/need to "hotlink" to jQuery on a remote server, it's
better to use ajax.googleapis.com.  For example:

http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js

That will pull the "minimized" (comments and whitespace stripped ==
smaller download) 1.3.2 version of jQuery from Google.  Google DOES
GZip these files, which is useful if you can't get it gzipped on your
hosting service.


Re: Initial Setup

by Andrew243 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks, very helpful -- three more questions:
* Is there documentation covering basic questions like these?
* Can I reference the latest version, if so what would be the URL?
* Can I also hotlink to plugins?  For example I want to use TreeView,
what would be the URL for that .js file?

I've tried various URLs to do both, but not found one that works.

Andrew

On Jul 3, 3:49 pm, Pyrolupus <pyrolu...@...> wrote:

> On Fri, Jul 3, 2009 at 8:51 AM, Andrew <m...@...> wrote:
> > I'm new to JavaScript -- and cannot get jQuery to work (unless I
> > accesshttp://code.jquery.com/jquery-latest.js)
> > ...
> > * my hosting service does doesn't have gzip compression enabled --
> > what file do I need to install on my server if I don't have GZIP
> > available?
>
> If you want/need to "hotlink" to jQuery on a remote server, it's
> better to use ajax.googleapis.com.  For example:
>
> http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
>
> That will pull the "minimized" (comments and whitespace stripped ==
> smaller download) 1.3.2 version of jQuery from Google.  Google DOES
> GZip these files, which is useful if you can't get it gzipped on your
> hosting service.

Re: Initial Setup

by Charlie Tomlinson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

version is in the url  current version of jQuery is 1.3.2, just change url .

plugins generally don't have AJAX libraries and if you bootleg them from somone elses server you are at mercy of their server. Google with international network is a different story.

http://code.google.com/apis/ajaxlibs/documentation/index.html#jquery

Andrew wrote:
Thanks, very helpful -- three more questions:
* Is there documentation covering basic questions like these?
* Can I reference the latest version, if so what would be the URL?
* Can I also hotlink to plugins?  For example I want to use TreeView,
what would be the URL for that .js file?

I've tried various URLs to do both, but not found one that works.

Andrew

On Jul 3, 3:49 pm, Pyrolupus pyrolu...@... wrote:
  
On Fri, Jul 3, 2009 at 8:51 AM, Andrew m...@... wrote:
    
I'm new to JavaScript -- and cannot get jQuery to work (unless I
accesshttp://code.jquery.com/jquery-latest.js)
...
* my hosting service does doesn't have gzip compression enabled --
what file do I need to install on my server if I don't have GZIP
available?
      
If you want/need to "hotlink" to jQuery on a remote server, it's
better to use ajax.googleapis.com.  For example:

http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js

That will pull the "minimized" (comments and whitespace stripped ==
smaller download) 1.3.2 version of jQuery from Google.  Google DOES
GZip these files, which is useful if you can't get it gzipped on your
hosting service.
    

  


Re: Initial Setup

by Doug Nelson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> * Can I reference the latest version, if so what would be the URL?

The latest version would be the 1.3.2 mentioned in the comments. I
don't believe Google provides a way to just get the 'latest', but you
probably wouldn't want to, because jQuery can change how some
functions work from version to version - an automatic update like this
could break your site, and it might take you some time to notice, pin
down, and debug.

It's probably safer to work with the most recent stable version and
test your code with a new version before upgrading.

Re: Initial Setup

by Karl Swedberg-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


If you want to link to version 1.3.2, use this:
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js

If you want to link to the most recent 1.3.x version, use this:
http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js

If you want to link to the most recent 1.x version, use this:
http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js


--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jul 4, 2009, at 10:31 AM, Charlie wrote:

version is in the url  current version of jQuery is 1.3.2, just change url .

plugins generally don't have AJAX libraries and if you bootleg them from somone elses server you are at mercy of their server. Google with international network is a different story.

http://code.google.com/apis/ajaxlibs/documentation/index.html#jquery

Andrew wrote:
Thanks, very helpful -- three more questions:
* Is there documentation covering basic questions like these?
* Can I reference the latest version, if so what would be the URL?
* Can I also hotlink to plugins?  For example I want to use TreeView,
what would be the URL for that .js file?

I've tried various URLs to do both, but not found one that works.

Andrew

On Jul 3, 3:49 pm, Pyrolupus pyrolu...@... wrote:
  
On Fri, Jul 3, 2009 at 8:51 AM, Andrew m...@... wrote:
    
I'm new to JavaScript -- and cannot get jQuery to work (unless I
accesshttp://code.jquery.com/jquery-latest.js)
...
* my hosting service does doesn't have gzip compression enabled --
what file do I need to install on my server if I don't have GZIP
available?
      
If you want/need to "hotlink" to jQuery on a remote server, it's
better to use ajax.googleapis.com.  For example:

http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js

That will pull the "minimized" (comments and whitespace stripped ==
smaller download) 1.3.2 version of jQuery from Google.  Google DOES
GZip these files, which is useful if you can't get it gzipped on your
hosting service.