Javascript not working on sub pages
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
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
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).
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
>"
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