Home » SharePoint 2013 » Working with jQuery Selectors in SharePoint Server 2013

Working with jQuery Selectors in SharePoint Server 2013

Our set of video tutorials, SharePoint 2013: JavaScript and jQuery is authored by Marc Anderson, a SharePoint MVP and published author. We’ve written the last few posts of this blog as commentary on the first 5 tutorials included in the set. This post touches on the 5th tutorial in the set, “jQuery Selectors”.

The intended audience for this tutorial are SharePoint administrators, developers and designers. The presumption is the audience will have, at a minimum, a good understanding of developing processes for SharePoint 2013 with Visual Studio.

If developers also have a familiarity with developing online processes for the web, then the content will be even more useful. Marc Anderson explains on numerous occasions throughout the first 4 videos the importance of Cascading Style Sheets (CSS) and Hypertext Markup Language (HTML) to the jQuery library of functions for writing software applications with JavaScript.

The 5th video in this series explorers jQuery selectors. Think of a web page as a large collection of tags, IDs, and classes. The volume of information included in pages served by SharePoint Server 2013 is comparatively even larger than the norm. SharePoint 2013 page design still relies heavily on tables as a method of locating text, objects, and even behaviors at specific locations on a page. The typical nesting of tables required to specifically position elements contributes to the sheer volume of information.

So selectors are used in jQuery to “match sets of elements in a document” (quoted from Category: Selectors as published on the jQuery API Documentation web site).

Marc demonstrates how to use unique placeholders to represent specific CSS selectors. He also points out the difficulty of working with the very long selectors produced by .net, and why mapping each of these selectors to variables with more logical, and semantically friendlier names makes a lot of sense.

Ira Michael Blonder

© Rehmani Consulting, Inc. & Ira Michael Blonder, 2013 All Rights Reserved