I would like to thank everyone who attended this session on jQuery and SharePoint 2007. I had a wonderful time presenting and hope to do it again very soon.
I anticipate to blog about the last portion of this track that i was unable to get to. That is to demonstrate how to utilize jQuery in a SharePoint solution to build a custom field type. But first just a quick overview about last nights user group meeting.
What is jQuery?
Depending on how you look at it, jquery is just an easier way to do Javascript. It can simplify a lot of what use to be fairly difficult and sometimes tedious using straight up Javascript.
Where do i get jQuery?
The latest version v1.4.1 is available at
jQuery.com. Ideally you would download the jQuery library and deploy to a SharePoint front end web server or to a SharePoint library or folder within a site collection , but there are other ways to access the jquery library.
Google AJAX Libraries API
http://www.google.com/jsapi
jQuery hosted by Microsoft
http://ajax.microsoft.com/ajax/jquery/jquery-1.4.1.min.js
How to use jQuery?
The most traditional way to access by referencing the library with a script tag embedded on to a page or Content Editor Web Part. The focus of this presentation was the manipulation of multiple DOM nodes, specifically CSS classes.
<script type="text/javascript" src="../../js/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.ms-sitetitle h1').hide();
});
</script>
This example will hide the header title of a SharePoint page. Starting with the $ function it is usually followed with a CSS selector string, which will result in the jQuery object referencing zero or more elements in the HTML page. The hide() event will, of course, hide the title. Enjoy!
There is a growing community of jQuery developers and i would like to thank the following people of there contributions and examples that you have seen in my user group presentation.
Jan Tielen - Intergrating SharePoint 2007 and jQuery
http://weblogs.asp.net/jan/
Paul Grenier - jQuery for Everyone
http://www.EndUserSharepoint.com
Christophe Humbert
http://www.PathToSharePoint.com