Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > jQuery Issue View modes: 
User avatar
Member
Member
james.bills-columbiasouthern - 6/28/2011 2:58:50 PM
   
jQuery Issue
I am trying to integrate a jQuery function on one of my pages and it works fine prior to placing it in Kentico. This is what I have included in the head. I am linking to an external jQuery file for testing purposes. Anyone have any suggestions?

<script type="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>

<script>
$(document).ready(function() {

//When page loads...
$(".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 href attribute value to identify the active tab + content
$(activeTab).fadeIn(); //Fade in the active ID content
return false;
});

});
</script>

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 7/4/2011 2:19:13 AM
   
RE:jQuery Issue
Hello,

could you please check that all those referenced CSS classes exists on your page?

Also, please make sure that this jQuery library doesn't collide with any other JavaScript library. Moreover, are there any JavaScript errors?

Please try to place this script to completely separated document with page template which doesn't inherit anything.

Let us know your findings.

Best regards
Ondrej Vasil