matthewhall / matt-tabs

A simple jQuery plugin for creating tabbed interfaces.
Do What The F*ck You Want To Public License
6 stars 4 forks source link

Markup Reliance #1

Closed Palgie closed 12 years ago

Palgie commented 12 years ago

It would be good to remove the reliance of the generated markup from the plugin.

I used it on a project with OOCSS where the tabbed content styles were shared on other elements within the site which meant if I used the generated markup in this plugin it would mean specifying the selectors again in the CSS to match the generated markup.

It would be good to allow existing markup to work with the plugin by passing selectors for the content and tab.

When JS is off it could be tackled with the .js class when javascript is on. I think it'll be a useful thing to still optionally allow the markup to be visible when JS is off (to allow a fallback to link to a list), this would have been useful for my recent project when trying to iterate lists as when the JS fails the tabs should link directly to a list through a link rather than removing the content entirely.

matthewhall commented 12 years ago

I've got an idea for this. Let me see if I can put something together in the next few days.

matthewhall commented 12 years ago

Hopefully this commit: https://github.com/matthewhall/matt-tabs/commit/6a6476c35727b16b8b526e1ac89c675b9e10a59d should address the things you've raised. It'll allow you to specify the HTML element container for the tab menu as well as customise the markup for each tab.