Jquery Conflict

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
User avatar
Peter Riad
Posts: 3
Joined: Mon Nov 02, 2015

02 Nov 2015

I am using SPForms for one of our sites, where the master page already includes a refrence for jquery files (as shown below).

<SharePoint:ScriptLink ID="ScriptLinkjQuery" runat="server" Defer="False" Name="/_layouts/15/Portal15Branding/scripts/jq/jquery-1.10.2.min.js"></SharePoint:ScriptLink>

<SharePoint:ScriptLink ID="ScriptLinkForModernizer" runat="server" Defer="False" Name="/_layouts/15/Portal15Branding/scripts/jq/modernizer.js"></SharePoint:ScriptLink>

<SharePoint:ScriptLink ID="ScriptLinkForSPServices" runat="server" Defer="False" Name="/_layouts/15/Portal15Branding/scripts/jq/jquery.SPServices-2014.01.min.js"></SharePoint:ScriptLink>

when I try to hide tabs using the logic below, i recive an error ""Object doesn't support property or method 'tabs'"

$('#fd_tabcontrol-0').tabs('option', 'disabled', [1]);


for me it looks to be an issue with multiple loads of jquery file.


Please advice

User avatar
rostislav
Moderator
Posts: 364
Joined: Mon Oct 19, 2015

03 Nov 2015

It's not a conflict per se. You're probably trying to access jQuery via the console? If so, if you want to access Forms Designer's version of jQuery you should be using Plumsail.FD.jQuery instead of $. You can reassign the $ variable in th console with the following:

var $ = Plumsail.FD.jQuery;

or use the following inside the JS editor of Forms Designer:

window.$ = $;


If this solution doesn't solve your issue, please send a screenshot of the errors in the console to support@spform.com.

User avatar
Peter Riad
Posts: 3
Joined: Mon Nov 02, 2015

03 Nov 2015

Thanks a lot, I was actually using the console to try the Js first before injecting it to the FD javascript section, when i move the line to the FD javascript section, it worked.


when i try to use the console , and try to run the command as provided "var $ = Plumsail.FD.jQuery;" it gives me the following error:"Unable to get value of the property 'jQuery': object is null or undefined"


Note: I am using v.2.8.6

User avatar
rostislav
Moderator
Posts: 364
Joined: Mon Oct 19, 2015

03 Nov 2015

Try using

Code: Select all

var $ = $fd_jQuery;

User avatar
Peter Riad
Posts: 3
Joined: Mon Nov 02, 2015

03 Nov 2015

Thn aks alot, it worked :)

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests