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

Forums / Bugs & Issues / Javascript not working on sub pages

Javascript not working on sub pages

5 posts, 0 answered
  1. Matthew
    Matthew avatar
    10 posts
    Registered:
    31 Mar 2011
    23 May 2011
    Link to this post
    Hi..

    just noticed a issue I'm slightly concerned about. I have a jquery plug in that works fine on the main pages but as soon as I place the page under another page the plug in fails. This doesnt seem right to me. Is there a fix for this? 

    Reagrds Matt
  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    18 Aug 2017
    24 May 2011
    Link to this post
    Hello Matthew,

    When testing with simple jQuery regardless of the number of page nestings it executes. Please provide the script you are using so we can examine the problem and provide you with solution.

    Looking forward to your reply.

    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. Tony
    Tony avatar
    2 posts
    Registered:
    01 Sep 2010
    24 May 2011
    Link to this post
    I'm having the same problem as well. I included jQuery using the script control in my template. All the roots pages works fine but the child pages doesn't work (no jQuery found in the source code). 
  4. Matthew
    Matthew avatar
    10 posts
    Registered:
    31 Mar 2011
    25 May 2011
    Link to this post
    ok please find below the code I'm using. its for a simple tabs control which like I said in fist post works fine in main pages but not child pages. Is this an easy fix?

    I have to say this is a major concern for me regarding sticking with sitefinity as my chosen CMS! we us a lot of jquery plugins in our sites.

    "<script type="text/javascript" language="javascript">
            $(document).ready(function() {
     
     
                $.featureList(
                    $("#tabs li a"),
                    $("#output li"), {
                        start_item  :   1
                    }
                );
     
     
                /*
                 
                // Alternative
     
     
                 
                $('#tabs li a').featureList({
                    output          :   '#output li',
                    start_item      :   1
                });
     
     
                */
     
     
            });
        </script>
         
         
         
        <script type="text/javascript">
     
     
    $(document).ready(function() {
     
     
        //Default Action
        $(".tab_content").hide(); //Hide all content
        $("ul.tabs li:first").addClass("active").show(); //Activate first tab
        $(".tab_content:first").show(); //Show first tab content
         
        //On Click Event
        $("ul.tabs li").click(function() {
            $("ul.tabs li").removeClass("active"); //Remove any "active" class
            $(this).addClass("active"); //Add "active" class to selected tab
            $(".tab_content").hide(); //Hide all tab content
            var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
            $(activeTab).fadeIn(); //Fade in the active content
            return false;
        });
     
     
    });
    </script>"




    kind Regards Matt
  5. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    18 Aug 2017
    26 May 2011
    Link to this post
    Hi Matthew,

    I am still unable to reproduce the issue at my end so please provide some more information on your project. How do you insert the javascript to the page [ widget ( where do you point the scripts to be placed body,head), on the master page ... ] have you made some modifications to the administrative settings that handle scripts on pages, are you using some unsupported version of jQuery ( the installed version which sitefinity uses can be found Administration -->Advanced settings -->pages --> script manager --> script references ).

    All the best,
    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 posts, 0 answered