I use JS here and there mainly for slideshows, form validation, drop down sitenav (next step) but I have a few noobie questions if some one has the time…
I have been able so far just to use a jquery library on my server but recently start using a calendar for clients to select a date of birth. The calendar required these sources.
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
My instinct tells me I should have these .js and .css files on my server, is it bad practice to use http sources? I’m currently keeping the links because I need to reference these libraries from different directories of my site.
Are these jquery plugins or is it Ajax? as they’re not in the main jquery library. I thought Ajax was an MS alternative to JQuery but now I’m confused… Is there a common large library people like to use or is it common to just add smaller ones here and there?
Any help much appreciated.
Actually using the google code repository like this has some advantages over storing these files on your own server. For one thing, it might speed up the client because some folks will not have to download the js files since their browser would have cached these files on previous use.
jQuery is a library of functions for making cross browser javascript including AJAX easier. AJAX is a technique for asynchronously requesting server side resources. It is not equivalent to jQuery.
You have included the core jquery library and the jquery UI library in the code snipet that you provided. This is common. In addition there are hundreds of plugins that you optionally can include as needed.