Sep 26, 2009

jQuery Test Panel for SharePoint

I don’t think I’ve to told anybody how cool jQuery is, you know already, nor how to integrate in SharePoint. Let’s start with a screenshot:

image

The idea is to have a Webpart on your SharePoint site that simply executes jQuery statements.

Just great to experiment with jQuery and SharePoint or to learn jQuery.

All you need is a standard Content Editor Webpart with the following with the following content (source).













Works great with IE Developer Toolbar together.

Examples:

$(“.ms-sitetitle”) // selects the site title

$(“a[href^=’http://’]”).attr(“target”,”_blank”) // open all absolute links in a new window

$("*").click(function(event){
  $(this).hide("slow"); return false;
});
//just fun ;-)

4 comments:

René Hézser said...

Hi Christian,
after attending your session at the ShareConnect in Mainz, this article is a must-have :-)
I'll start playing around with jQuery now.

René

Jeroen said...

If you like JQuery and SharePoint then check out the free SharePoint Infuser and associated blog entries at

http://muhimbi.com/blog/2009/07/massage-sharepoint-into-submission.html

Juan Pablo Pussacq Laborde said...

Nice!!!

Samir said...

Check out a great SharePoint jQuery library called jPoint on http://www.sharejpoint.com