• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Jquery] Tabs

Kavvson

Gdy boli cie glowa wez
Joined
Jun 25, 2008
Messages
1,177
Reaction score
72
Location
Poland
How can i display in the tabs the content from a loop? As you see the <ul>/<li> part works. But how could i get a content in it? Additionally i guess there is needed a
$number++ but i dont know how to add this

echo " <li class=\"active\"><a href=\"#tab1\">".$character->name." (".$character->level.")</a></li>";

HTML:
<div class="container">
    <ul class="tabs">
     <?PHP
   
   $get = $mysqli->query("SELECT * FROM `players` WHERE `account_id` = ".$accountresult['account_id']."");
    if($get == TRUE) {
        while($character = $get->fetch_object()) {
            echo " <li class=\"active\"><a href=\"#tab1\">".$character->name." (".$character->level.")</a></li>";
        }
    }
    else
        echo '<b>This character does not exist:</b> <font color="red">'.$_GET['editcharacter'].'</font>';
?>
    </ul>
    <div class="tab_container">
        <div class="tab_content" id="tab1" style="display: block;"></div>
        <div class="tab_content" id="tab2" style="display: none;"></div>
        <div class="tab_content" id="tab3" style="display: none;"></div>
        <div class="tab_content" id="tab4" style="display: none;"></div>
    </div>
</div>

2isk17p.jpg
 
Hmm i guess its not about the jquery just about how to display it in 2 other divs


@btw

can u create me a health bar? with maxhealth
 
Last edited:
Back
Top