Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8981423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:19:55+00:00 2026-06-15T20:19:55+00:00

Sorry for this absolute noob question. I am trying to implement Tabs with this

  • 0

Sorry for this absolute noob question.
I am trying to implement Tabs with this MooTools Plugin:
http://mootools.net/forge/p/simple_tab_pane

The syntax for the constructor is as follows:

var myTabPane = new TabPane('tabs', { 
    tabSelector: 'li', 
    contentSelector: 'p' 
});

Where ‘tabs’ is the CSS-id of the container.

Now I would prefer to use a class for the container but ‘.tabs’ won’t work.
What would be the correct syntax for this?
And how should i do it to adress for example every div-Element ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:19:57+00:00Added an answer on June 15, 2026 at 8:19 pm

    well first things first – what is expected:

    https://github.com/akaIDIOT/MooTools-TabPane/blob/master/Source/TabPane.js#L44

    he expects argument to be an element id or an actual element. how you arrive to that element is up to you.

    var myTabPane = new TabPane(document.getElement('.tabs'), { 
        tabSelector: 'li', 
        contentSelector: 'p' 
    });
    

    passing an element found based upon a class search for .tabs.

    alternatively, you can re-implement the initialize method on the class and write the line as:

    this.container = document.getElement(container);
    this.container.getElements(this.options.contentSelector).setStyle('display', 'none');
    

    so you can then pass a jquery like selector: new TabPane('#someid') or new TabPane('div.someclass')

    You’d refactor it by doing TabPane.implement({ initialize: fn(){... }) or do a subclass like var myTabs = new Class({extends: TabPane, initialize: fn(){ ... }). When you extend, this.parent() will call the parent method over the prototype.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sorry if this is an absolute noob question, but I can't figure this
Sorry if this is a stupid question... I've developed an application that creates absolute
Sorry this might be a total noob question I downloaded a backbone example app
http://jsfiddle.net/YZdv4/50/ heres the jsfiddles UPDATE: I figured you could do this with absolute positioning
This is an absolute beginner's question (sorry), but I was wondering how to commit
Sorry this is not a very well defined question, I am thinking about an
Sorry this is a basic question, but all my research just barely missed answering
sorry this is such a simple question but I can't figure it out. How
Sorry for this simple question, but I can't solve it... There is an example:
Sorry if this question seems stupid, but it's stumped me for a couple days,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.