Hi, I have Jquery tabs that work well, however, if javascript is off the tabs do not degrade. i.e. I am getting a link http://domain/#tab-3 that reverts to the root. Is this something that you just have to accept? I saw in another thread that it was mentioned it degrades well, but not sure how that was set up.
http://modxcms.com/forums/index.php?topic=19582.0
Here is my code:
<div id="tabs">
<ul>
<li><a href="#tabs-1">[[GetField? &docid=`76` &field=`pagetitle`]]</a></li>
<li><a href="#tabs-2">[[GetField? &docid=`95` &field=`pagetitle`]]</a></li>
<li><a href="#tabs-3">Contact Information</a></li>
</ul>
<div id="tabs-1">
<p> [!DynContent?docid=`76`!]</p>
</div>
<div id="tabs-2">
<p> [!DynContent?docid=`95`!]</p>
</div>
<div id="tabs-3">
<p> Contact Information</p>
</div>
</div>
Also, is there an ability to bookmark tabs like this?
Thank you!
"Remember what Bilbo used to say: It's a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to."
-J.R.R. Tolkien from The Lord of the Rings
-
☆ A M B ☆
- 3,141 Posts
You could make the tabs link to the actual document ( <a href="[~[*id*]~]" ) so users without javascript will go to the main page instead of open the tab.
-
☆ A M B ☆
- 3,141 Posts
Quote from: bunk58 at Jun 18, 2010, 07:24 AM
Or use one of the base url plugins
Quote from: Kristalin at Jun 18, 2010, 07:28 AM
Or with Self Reference Extended
http://setpro.net.pl/software/self-reference

But that wouldn’t fix the problem of people without JavaScript not seeing the content in the tabs, does it?
I really appreciate this response! I am working this up now and it seems to be working. This has been very helpful!
"Remember what Bilbo used to say: It's a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to."
-J.R.R. Tolkien from The Lord of the Rings