Page 1 of 1

jQuery TABS and Mod_ReWrite - Pretty URLS

Posted: Thu Mar 10, 2011 1:14 am
by heffegg
Sorry if this is the wrong place for this question.
But I need help to get jQuery tabs on a page working when pretty URLs are enabled.

If I run default CMSMS so URL is index.php?page=page_name
With jQuery tabs code

Code: Select all

<div id='tabs'>
<ul>
<a href='#tabs-1'>Link to Tab 1</a>
<a href='#tabs-2'>Link to Tab 2</a>
</ul>
<div id='tabs-1'>
tab 1 content block goes here
</div>
<div id='tabs-1'>
tab 2 content block goes here
</div>
</div>
everything works fine and as expected.

WHEN I enable pretty urls so they appear as domain_name/page.html

The tabs stop appearing as tabs - they are displayed as a list.
AND all tab links return to the home page.
They are converted to: domain_name/#tab-1

See: http://ballinacampers.com.au/index.php? ... -melaleuca this is how the page should look and work after pretty URLs are enabled.

Any help with resolving this would be very much appreciated.

Re: jQuery TABS and Mod_ReWrite - Pretty URLS - HELP

Posted: Thu Mar 10, 2011 7:10 pm
by Dr.CSS
You need to put your {metadata} tag near/at the top of the template/<head> so your base href has time to kick in before your JS etc. and you need to clean up your code/html, kind of missing a > on the end here...

</head></__body>
<div id="preload"}
<img src="uploads/images/banners/banner_1.jpg"

Re: jQuery TABS and Mod_ReWrite - Pretty URLS - HELP

Posted: Thu Nov 17, 2011 6:43 pm
by newagekat
forgive me for being obtuse. i'm using cmsms v1.9.4.2. i want to add jQuery tabify to a page content. i've done this in older versions without issue, but now it won't tab.

This is what i have:
in template
<head>
{metadata}

below stylesheet call
{literal}
<__script__ src="uploads/js/jquery1-5.js" type="text/javascript"></__script>
<__script__ src="uploads/js/jquery.tabify.js" type="text/javascript"></__script>
<__script__ type="text/javascript">
// <![CDATA[

$(document).ready(function () {
$('#menu').tabify();
});

// ]]>
</__script>

in the page
<ul id="menu" class="menu">
<li class="active"><a href="#individual">individual and sequenced sessions</a></li>
<li><a href="#professional">professional learning programs</a></li>
</ul>

<div id="individual"></div>
<div id="professional"></div>

the url to the site is http://www.tc2.ca/cmsms/index.php?page= ... ortunities

the tabs do show up, but again when you click on the next tab, it still goes to the home page. any suggestions? i will be adding pretty urls when we move the site to root.