1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Loading JQueryUI

Loading JQueryUI

6 posts, 0 answered
  1. Amir
    Amir avatar
    4 posts
    Registered:
    20 May 2011
    03 Jun 2011
    Link to this post
    Hi

    I had a look to the list of script references in sitefinity settings. I want to use one of them in my custom control. The script reference is "JQueryUI", I want to load it on the custom control. Please let me know how it i can do that?
  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    18 Sep 2017
    03 Jun 2011
    Link to this post
    Hi Amir,

    Telerik.Sitefinity.Resources.Scripts.jquery-ui-1.8.8.custom.min.js or take a look at this forum thread where you will find code for control using jQueryUI.

    Please write back if you need further help.

    Best wishes,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Matthew Tamm
    Matthew Tamm avatar
    4 posts
    Registered:
    26 Oct 2004
    07 Jun 2011
    Link to this post
    Hi Telerik, Amir...

    I think I am looking to do the same thing as Amir here...  using the ResourceLinks/ResourceFile we can load JQuery:

    <sf:ResourceLinks id="resourcesLinks" runat="server">
       <sf:ResourceFile JavaScriptLibrary="JQuery"/>
    </sf:ResourceLinks>

    I would assume that the embedded JQueryUI scripts would be available using the same method, but the following fails:

    <sf:ResourceLinks id="resourcesLinks" runat="server">
       <sf:ResourceFile JavaScriptLibrary="JQuery"/>
       <sf:ResourceFile JavaScriptLibrary="JQueryUI"/>
    </sf:ResourceLinks>

    Cannot create an object of type 'Telerik.Sitefinity.Web.UI.JavaScriptLibrary' from its string representation 'JQueryUI' for the 'JavaScriptLibrary' property.

    I am attempting the impossible?  or just doing it wrong??  If JQueryUI is embedded just as JQuery is, shouldn't this just work?

    I did try this and it appears to be working:

    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
    <sf:ResourceLinks id="resourcesLinks" runat="server">
       <sf:ResourceFile name="Telerik.Sitefinity.Resources.Scripts.jquery-1.5.2.min.js" />
       <sf:resourcefile name="Telerik.Sitefinity.Resources.Scripts.jquery-ui-1.8.8.custom.min.js" />
    </sf:ResourceLinks>

    Thanks
  4. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    18 Sep 2017
    08 Jun 2011
    Link to this post
    Hi Matthew,

    The approach
    <sf:ResourceFile JavaScriptLibrary="JQueryUI"/>
    will not call this library - it is used for jQuery. You should use Telerik.Sitefinity.Resources.Scripts.jquery-ui-1.8.8.custom.min.js as you have figured out yourself. jQueryUI is not embedded in jQuery.

    Please write to us back if you need further assistance with this.

    Regards,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Brad H
    Brad H avatar
    9 posts
    Registered:
    20 Aug 2009
    30 Aug 2011
    Link to this post
    Is this still valid with 4.2?  After upgrading to 4.2, my jQuery is broken.  Do I need to reference a newer version of JQuery UI?
  6. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    18 Sep 2017
    02 Sep 2011
    Link to this post
    Hi Brad,

    Refer to this blog post for relevant information on adding jQuery.

    Regards,
    Stanislav Velikov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

6 posts, 0 answered