Chapter 3. jQuery to the Rescue
It seems like every time I turn around, I have a project that reaches just beyond what SharePoint will do with out-of-the-box (OOB) functionality. And just about every time that happens, jQuery comes to the rescue to make the job easy, elegant, and robust.
Because SharePoint uses web technologies, we’re blessed with being able to use JavaScript to manipulate the presentation layer programmatically. One of the most popular JavaScript libraries today is called jQuery. jQuery gives us an easy way to manipulate the document object model (DOM) of the web pages created by SharePoint. This all happens in the browser after the page has been served up and rendered. But, it’s so fast, many of its features appear to happen on load. Others can be utilized with JavaScript to allow the page to change based on user interaction.
In this chapter, I’ve only touched the tip of the iceberg by showing some examples in which you can use jQuery for some great, easy-to-use functionality. When you’re done with this chapter, you will know how to use jQuery to effect the following changes on your pages:
- Automate all-day events
When you want all of your Calendar entries to be an all-day event, this little lesson shows you how to check the box automatically and then hide it so the user can’t change it. The example here is a Mileage Report submission calendar, where only the date matters and not the time of day.
- Requesting a review only once
Sometimes you want to solicit ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access