Solved

JQuery Tabs

Posted on 2011-03-18
1
424 Views
Last Modified: 2012-05-11
Hi,

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;
	});

Open in new window


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
0
Comment
Question by:Webbo_1980
1 Comment
 
LVL 4

Accepted Solution

by:
chuckalicious earned 500 total points
ID: 35169379
If you mean that you have a webpage that when viewed by a user, has tabs containing content, but when viewed in an "edit" mode in the CMS, the editor needs to be able to modify the actual structure of the tabs, or do they need to be able to edit the content of each tab?

For any CMS' I've put together, I've used CKEditor for the main body of content, which operates as a WYSIWYG interface for editing content. However for complex pages you can edit the actual source, at which point you could edit/modify the actual tab structure.

Of course I could be totally misunderstanding what you are needing.

Alternatively you could easily build an admin interface which took advantage of the jQuery tabs methods for adding, editing, removing etc.

You will of course need to ensure that whatever backend you are using is able to save these changes to make sure they are permanent.

I hope that's helped in some way.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Jquery form 9 42
CSS - Centering an image 2 26
Duplicate Elements with JS / jQuery 3 24
Read text on Table 7 29
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question