If using jQuery with SharePoint 2010, ALWAYS put jQuery into ëno conflict modeí via jQuery.noConflict(). This is necessary because SharePointís internal JavaScript uses the $ symbol as a variable name in a couple of places, and this causes clashes since itís the alias used by jQuery
The deck has information on my ë3 core techniquesí for jQuery/AJAX apps with SharePoint, and also tips and tricks like how to get Intellisense for jQuery and the SP2010 Client Object Model, tools for debugging AJAX apps etc. The code samples cover a fairly wide range of things:
jQuery
– Showing/hiding elements
– Setting the HTML of an element
– Cascading dropdowns
– AJAX requests
– Client Object Model
– Fetching simple data
– Implementing a ìtype-ahead filteringî sample against the documents in a document library
– Creating data e.g. a new list item
– Techniques for reducing the data going over the wire (by 95% in my example!)
– jQuery + HTTP handlers
Why/how
– Returning simple data
– Returning complex data as JSON
You can download my slide deck and code samples from:
http://dl.dropbox.com/u/11342240/ChrisOBrien_jQueryAJAXSP2010_SamplesAndDeck.zip
