Where to locate the jquery.SPServices library

Dec 10, 2014 at 1:51 PM
Hello,

I had used jquery before, but not in Sharepoint.

I have received a Site for a new development, but i am just the Owner so i have not admins rights.

I can edit html, but the page have place-holders and other code that i dont know if can be removed.

Where may i add the <scripts> to reference jquery and jquery.SPServices-2014.01 libraries ?

Regards
Coordinator
Dec 10, 2014 at 2:15 PM
Take a look at the first page of the documentation. It gives you options for this.

M.
Dec 10, 2014 at 3:05 PM
Edited Dec 10, 2014 at 3:16 PM
M, thanks for u time,

I create a library in Shared Documents, a folder then add those 2 files jquery-1.11.1.min.js and jquery.SPServices-2014.01.min.js

then

open the page with Notepad++ and following your suggestions then add this ..

<script language="javascript" type="text/javascript" src="/Scripts/jquery-1.11.1.min.js"></script>
<script language="javascript" type="text/javascript" src="/Scripts/jquery.SPServices-2014.01.min.js"></script>
<script language="javascript" type="text/javascript"> $(document).ready(function() { alert("jQuery"); }); </script> after this line

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

The alert was triggered.
Dec 10, 2014 at 3:08 PM
Edited Dec 10, 2014 at 3:49 PM
Did you suggest this place to keep those files ?
Could you suggest me some UI to edit sharepoint pages? because SP Designer look a little tied

Regards
Dec 10, 2014 at 3:54 PM
Edited Dec 10, 2014 at 4:00 PM
'SPServices' is null or not an object

As i told i just recieve a Test Environment

I start debuggin and discover that the page load jQuery from previous reference,
<script type="text/javascript" src="/_layouts/Company.SP.COLLAB.Master/jquery-1.8.3.min.js"></script>

my libraries are not founded, thats why SPService is not referenced, then make a change to:

<script language="javascript" type="text/javascript" src="../Shared Documents/Scripts/jquery-1.11.1.min.js"></script>
<script language="javascript" type="text/javascript" src="../Shared Documents/Scripts/jquery.SPServices-2014.01.min.js"></script>
<script language="javascript" type="text/javascript"> $(document).ready(function() { var SPuserName = $().SPServices.SPGetCurrentUser({ fieldName: "Name" }); alert(SPuserName); }); </script> then recieve this,

'f.browser.msie' is null or not an object jquery.qtip-1.0.0-rc3.min.js, line 15 character 33280
Coordinator
Dec 10, 2014 at 3:57 PM
Odds are your src references aren't correct.

M.
Dec 10, 2014 at 11:31 PM
Judging from that error, the q-tip library isn't compatible with the version of jQuery that you are using.

jQuery.browser.msie was removed in 1.9.
http://api.jquery.com/jquery.browser/

After you fix that issue up, Marc is spot on with references not being right. That happens all the time b/c it's so easy to do.

Cheers,
Matthew