Skip Ribbon Commands
Skip to main content


> Posts > SharePoint & jQuery Starter Scripts
March 11
SharePoint & jQuery Starter Scripts

Super quick blog post for you guys. It struck me today the amount of times I have to go to an old script to copy and paste out my script references because I’m too lazy to type them out.

So, here are two scripts that you can drop into SharePoint as a starting point. The first one will get you ready to use SPServices and the second script is for using jQuery and the JavaScript Client Side Object Model (CSOM).

Both scripts reference jQuery from a CDN, so if you have your scripts stored somewhere else be sure to update that.

SPServices and jQuery

<script  type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>

<script type="text/javascript">
     jQuery(document).ready(function($) {
          alert("Okay! Let's get started!");    


Client Side Object Model (CSOM) and jQuery

<script  type="text/javascript" src=""></script>

<script type="text/javascript">
     ExecuteOrDelayUntilScriptLoaded(PageLoaded, "sp.js");

     function PageLoaded()
           alert("Okay! Let's get started!");


Okay, so maybe I’m the only one that needs these things lying around. At least I know where to grab them now.



Re: SharePoint & jQuery Starter Scripts


I'vew learned the hard way that it';s better for go protocol-less. So, like this:

<!-- Reference the jQueryUI theme's stylesheet on the Google CDN. Here we're using the "Start" theme -->
<link  type="text/css" rel="stylesheet" href="//" />
<!-- Reference jQuery on the Google CDN -->
<script type="text/javascript" src="//"></script>
<!-- Reference jQueryUI on the Google CDN -->
<script type="text/javascript" src="//"></script>
<!-- Reference SPServices on cdnjs (Cloudflare) -->
<script type="text/javascript" src="//"></script>


 on 3/11/2013 9:19 AM


Thanks for the addition Marc... good idea.

EMS\markrackleyNo presence information on 3/11/2013 9:26 AM


Thanks Mark.  I agree. These are great to have at your fingertips instead of recreating all the time.

I use scripts like this with a few autotext programs so 3 letters and RETURN spits out code such as this to get me going.

Glad I'm not the only one either.

Charlie Epes
Buffalo, NY

<style type="text/css">
.ms-vb {
 on 3/12/2013 8:01 AM

SharePoint Architect, Developer, Blogger, Speaker, Author, and general pain in the butt.
Thoughts, views, and opinions expressed in this blog are solely my own.
Remember, the Impossible just takes longer.

 Blogs you should be reading