2. » Summit 7 Systems was chosen by KMWorld Magazine as one of the top 100 Companies that Matter in Knowledge Management along with
companies such as Microsoft, Oracle and IBM.
» Summit 7 Systems was named to the 2011 and 2012 CRN Next-Gen 250 List as a company bringing innovative processes, methodologies and
models to the solution provider industry.
» Top 1% of Microsoft Partners Worldwide
» Summit 7 Systems was named #6 on the 2012 CRN Fast Growth 100 based on our 2009 – 2011 growth of over 930% per year.
» ~ 50% of Technical Staff hold US Government SECRET Clearances.
» Service Disabled Veteran Owned Small Business (SDVOSB).
Summit 7 systems is a premier provider of consulting and implementation services specializing on the
Microsoft SharePoint Platform and FAST Enterprise Search.
» Summit 7 Systems was chosen by KMWorld Magazine as one of the top 100 Companies that Matter in Knowledge Management along with
companies such as Microsoft, Oracle and IBM.
» Summit 7 Systems was named to the 2011 and 2012 CRN Next-Gen 250 List as a company bringing innovative processes, methodologies and
models to the solution provider industry.
» Top 1% of Microsoft Partners Worldwide
» Summit 7 Systems was named #6 on the 2012 CRN Fast Growth 100 based on our 2009 – 2011 growth of over 930% per year.
» ~ 50% of Technical Staff hold US Government SECRET Clearances.
» Service Disabled Veteran Owned Small Business (SDVOSB).
3. SERVICES
SharePoint QuickStart
Information Architecture and Governance Development
Upgrade and Migration
Branding and Design (User Experience)
Web Content Management Design and Deployment
SharePoint Search
Custom Workflow or Web Part Development
InfoPath Forms and Workflows
Performance Baselines and Best Practices Optimization
Mapping Business Process to Software Platforms
Cloud Services Design and Provisioning
Remote Support Contracts
Compliance Quickstart
SOFTWARE PLATFORMS
FAST Enterprise Search
SharePoint 2007
SharePoint 2010
SharePoint 2013
Office Platform
Sitecore
SOLUTION AREAS
SharePoint Platform Solutions
Enterprise Search
Enterprise Content Management
Internet / Web Content Management
Extranet Solutions
Intranet Solutions
Business Process Management
Enterprise Project Management
Exchange Server
SERVICES
SharePoint QuickStart
Information Architecture and Governance Development
Upgrade and Migration
Branding and Design (User Experience)
Web Content Management Design and Deployment
SharePoint Search
Custom Workflow or Web Part Development
InfoPath Forms and Workflows
Performance Baselines and Best Practices Optimization
Mapping Business Process to Software Platforms
Cloud Services Design and Provisioning
Remote Support Contracts
Compliance Quickstart
SOFTWARE PLATFORMS
FAST Enterprise Search
SharePoint 2007
SharePoint 2010
SharePoint 2013
Office Platform
Sitecore
SOLUTION AREAS
SharePoint Platform Solutions
Enterprise Search
Enterprise Content Management
Internet / Web Content Management
Extranet Solutions
Intranet Solutions
Business Process Management
Enterprise Project Management
Exchange Server
4. • 18+ years software architecture and
development experience
• SharePoint Junkie since 2007
• Event Organizer
• Blogger, Writer, Speaker
• Bacon aficionado
MARK RACKLEY / SOLUTIONS ARCHITECT
@mrackley http://www.sharepointhillbilly.com
5. AGENDA
• What is jQuery? Why SharePoint & jQuery?
• SharePoint and jQuery Basics
• Deploying / Maintaining
• Development Basics
• Third Party Libraries
• Examples & Demos
The SharePoint & jQuery Guide
http://bit.ly/jQueryAndSP
6. WHAT IS JQUERY?
• JavaScript Utility Library
• jQuery() or $()
• Allows interaction and manipulation of the DOM after
page is rendered
• Can interact with other systems using Web Services
• Supported by Microsoft
• Part of “Client Side” Development
8. WHY SHAREPOINT & JQUERY?
• Can replace the need for Visual Studio
• Can replace the need for basic workflows
• No points (shhhh… don’t tell the admins)
• You can get around the ListView Threshold (but should
you??)
9. JQUERY & SHAREPOINT BASICS
• Scripts execute with same privileges as current user
• Permissions cannot be elevated
• Interact with SharePoint List data using Client Side Object
Model (CSOM), REST, or SPServices
10. WHY I HATE JAVASCRIPT & JQUERY (SOME DAYS)
• Too many optionsvar car = {
color: “red”,
make: “Jeep”,
model: “wrangler”
}
var car = {};
car.color = “red”;
car.make = “Jeep”;
car.model=“wranger”;
var car = {};
car*“color”+ = “red”;
car*“make”+ = “Jeep”;
car*“model”+ =“wranger”;
11. WHY I HATE JAVASCRIPT & JQUERY (SOME DAYS)
• Too many options
• Debugging is painful
• Performance can suffer
• Inconsistent results on different browsers
• Constant changes in the jQuery library
• It CAN harm your farm!
12. WHEN SHOULD YOU USE JQUERY?
• Tightly controlled environments
• Visuals or Usability are high priorities
• Tight timeframes
• Simple page and form modifications
› Dynamic drop downs
› Hiding page elements
› Reading / populating fields
• Why would you NOT use jQuery?
13. WHEN SHOULD YOU QUESTION THE USE OF JQUERY?
• Need pull a lot of data over the wire to work with
• Iterating over many rows of list data
• Extended business logic or proprietary business logic
• Privileges need to be elevated
• Need to support many different browsers
14. DEPLOYMENT AND REFERENCE OPTIONS
• Deployment Options
• Document Library
• File System
• Content Delivery Network (CDN)
• Reference Options
• ScriptLink
• Content Editor Web Part
• Custom Action (deploys to Site Collection)
21. JQUERY BASICS
<div id=“myID” attribute=“myAttribute” class=“myClass” ><b>Hello World</b></div>
//Retrieve the element by ID:
$(“#myID”);
22. JQUERY BASICS
<div id=“myID” attribute=“myAttribute” class=“myClass” ><b>Hello World</b></div>
//Retrieve the element by attribute:
$(“div*attribute=‘myAttribute’+”);
23. JQUERY BASICS
<div id=“myID” attribute=“myAttribute” class=“myClass” ><b>Hello World</b></div>
//Retrieve every div on the page
$(“div”).each(function() ,
//”this” is the current element in each loop
$(this).method();
});
//Hide all divs on the page
$(“div”).hide();
24. JQUERY BASICS
<div id=“myID” attribute=“myAttribute” class=“myClass” ><b>Hello World</b></div>
//Retrieve every div of a specific class
$(“div.myClass”).each(function() ,
//”this” is the current element in each loop
$(this).method();
});
//Hide all divs of a specific class on the page
$(“div.myClass”).hide();
//Hide all elements of a specific class on the page
$(“.myClass”).hide();
25. JQUERY BASICS
<div id=“myID” attribute=“myAttribute” class=“myClass” ><b>Hello World</b></div>
//Retrieve the div that contains content “World”
$(“div:contains(‘World’)”).each(function() ,
//”this” is the current element in each loop
$(this).method();
});
26. JQUERY BASICS
<div id=“myID” attribute=“myAttribute” class=“myClass” ><b>Hello World</b></div>
//Retrieve the formatted HTML for an element
$(“#myID”).html(); //returns <b>Hello World</b>
//Set the formatted HTML for an element
$(“#myID”).html(“<b>Hello Nurse</b>”);
//Retrieve the text with HTML formatting stripped out
$(“#myID”).text(); //returns Hello World
//Set the unformatted text of an element
$(“#myID”).text(“Hello Nurse”);
27. MORE JQUERY BASICS
//get input / select values
$(“#id”).val();
//set input / select values
$(“#id”).val(“value”);
//check a check box
$(“#id").removeAttr('checked');
//uncheck a check box
$(“#id").attr('checked','checked');
//is a check box checked?
if ($(“#id”).is(':checked'))
28. MORE JQUERY BASICS
<tr id=‘myRow’><td><div id=‘myElement’></div><div id=‘myOtherElement’></div></td></tr>
29. MORE JQUERY BASICS
<tr id=‘myRow’><td><div id=‘myElement’></div><div id=‘myOtherElement’></div></td></tr>
//get the row that contains the div “myElement”
$(“#myElement”).closest(“tr”);
//get the cell that contains the div “myElement”
$(“#myElement”).closest(“td”);
Or
$(“#myElement”).parent();
30. MORE JQUERY BASICS
<tr id=‘myRow’><td><div id=‘myElement’></div><div id=‘myOtherElement’></div></td></tr>
//get the div AFTER myElement
$(“#myElement”).next(“div”);
Or
$(“#myElement”).next();
//get the div BEFORE myOtherelement
$(“#myOtherElement”).prev(“div”);
Or
$(“#myOtherElement”).prev();
31. CHAINING
//find the input element that has the “title” attribute equal to “Name”
//then find it’s parent cell’s previous cell. Then find the “h3” element and replace the HTML
$("input[title='Name']").closest("td").prev("td").find("h3").html("File Name <font color='red'>*</font>");
//In English: Find the label for the field “Name” and change it to “File Name” and add a red astrisk
//find the input element that has the “title” attribute equal to “City”
//then hide the entire row that contains the input
$(“input*title=‘City’+”).closest(“tr”).hide();
//In English: Hide the SharePoint Form Field and label for the field with the Display
//name “City”
32. HOW ABOUT SOME BEST PRACTICES?
• Use the Element’s ID when possible
• Reduce DOM searches
• Re-use code / Good coding practices
• Minimize files
• Use animations to hide slow performance
• Delay loading of Selects until you need the data
33. USING THIRD PARTY LIBRARIES
Tips for selection and integration
• Look for supported / documented libraries
• Test in target browsers before implementing
• Duplicate file structure
• Test “vanilla” in SharePoint first
34. USING THIRD PARTY LIBRARIES
Some of my favorites
• Content Slider - http://unslider.com
• Formatted Tables - http://www.datatables.net/
• Modal Window - http://www.ericmmartin.com/projects/simplemodal/
• SPServices - http://spservices.codeplex.com/
• Calendar - http://arshaw.com/fullcalendar/
• Forms 7 – http://forms7.codeplex.com