• When posting, please be aware that artistic nudity is still nudity and not allowed under RpNation rules. Please edit your pictures accordingly!

    Remember to credit artists when using work not your own.

Help Trouble with tabs

llSunflowerll

Dark Emperor of Destruction
Roleplay Availability
Roleplay Type(s)
So I'm just messing around with bbcode, trying to get a hang of it but I've run into a problem I don't understand.
[class name=scontainer] display: flex; flex-flow: row wrap; margin: 0px -4px; overflow: hidden; box-sizing: border-box; width:70%; [/class] [class name=sbutton] margin: 6px 10px; background-color: #9badb0; color: #1d4f54; flex: 1 0 100px; width: calc(100% - 10%); background: #9badb0; transition: all .8s ease-in-out; cursor: pointer; text-align: center; padding: 5px 5%; [/class] [class name=sbutton state=hover] background: #1d4f54; color: #FFFFFF; [/class] [class name=sbuttoncurr] background: #1d4f54; color: #FFFFFF; transition: all .8s ease-in-out; [/class] [class name=stab] display: block; background: #9badb0; box-sizing: border-box; width: 100%; padding: 10px; margin: 10px 2px; [/class] [script class=sbutton version=2] (hide "stab") (show "onetab") (addClass "sbuttoncurr" "onebtn") [/script] [script class=sbutton version=2 on=click] (hide "stab") (removeClass "sbuttoncurr" "sbutton") (= currenttab (index (split (getText) "#") 0 )) (show (+ currenttab "tab")) (addClass "sbuttoncurr" (+ currenttab "btn")) [/script] [div class="scontainer"] [div class="sbutton onebtn"]
one#
one[/div] [div class="sbutton twobtn"]
two#
two[/div] [div class="sbutton threebtn"]
three#
$$$[/div] [div class="stab onetab"]jjjjjjj[/div] [div class="stab twotab"]tab two[/div] [div class="stab threetab"]tab three[/div] [/div]

This code only works one per post but I wanted to figure out how to add more. Whenever I place more then one all of the tabs change at once instead of separately. I'm just curious to see if there is a fix or if I should try something else
 
So this tab code relies on the class names of the tabs and the tab buttons.

To be able to have multiple tab areas, you need to rename stab, sbutton, and the tabs themselves, as well as the bbscript. The link provided has detailed explanations and you can follow the general pattern they have for the div structure.
 
So this tab code relies on the class names of the tabs and the tab buttons.

To be able to have multiple tab areas, you need to rename stab, sbutton, and the tabs themselves, as well as the bbscript. The link provided has detailed explanations and you can follow the general pattern they have for the div structure.

Ok thank you! That's what I thinking it was but I mustve been changing the wrong things
 

Users who are viewing this thread

Back
Top