Webbo_1980
asked on
JQuery Tabs
Hi,
I've implemented a JQuery Tab functionality using the following code:
However when I'm using a CMS it doesn't allow me to edit the individual tabs - can anyone recommend a way that when I access this page via the CMS, this function won't run and will display the tabs in a manner I can edit them. But will operate when I access the front end website.
Many thanks,
Webbo
I've implemented a JQuery Tab functionality using the following code:
$(document).ready(function() {
// Tab Effect
$("#news-tab .tab-content").hide(); //Hide all content
$("#news-tab .tab-title ul li:first").addClass("active").show(); //Activate first tab
$("#news-tab .tab-content:first").show(); //Show first tab content
//On Click Event
$("#news-tab .tab-title ul li").click(function() {
$("#news-tab .tab-title ul li").removeClass("active"); //Remove any "active" class
$(this).addClass("active"); //Add "active" class to selected tab
$("#news-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;
});
However when I'm using a CMS it doesn't allow me to edit the individual tabs - can anyone recommend a way that when I access this page via the CMS, this function won't run and will display the tabs in a manner I can edit them. But will operate when I access the front end website.
Many thanks,
Webbo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.