Bootstrap DropDown question (newbie)


Topic: Bootstrap DropDown question (newbie)

Alexander656 asked 5 years ago

Hi, can someone help me with a bootstrap question? I am not a developer, altough I try to learn it a little.

I am trying to understand how a "connect4" game works and I want to make a drop down list that is in a working game to bootstrap since it has a better layout.

I tried but I can't figure out

  • How the player part works in the original code, I guess it is related to the javascript but I don't know how to use it in bootstrap.
  • How the value part works in the original code
  • How to make it so that if you select something it keeps being visible as this is your choice in the bootstrap version.

I copy paste the code here of the HTML dropdown.

Can someone help me to bootstrap this please

    <form id="players">
        <label>
            Yellow =:
            <select name="player_1">
                <option value="0">Een echt persoon</option>
                <option value="1">De computer speelt makkelijk</option>
                <option value="2">De computer doet een beetje gemeen</option>
                <option value="3">De computer doet gemeen</option>
                <option value="4">De computer doet belachelijk gemeen</option>
                <option value="5">De computer doet idioot gemeen, kan jij winnen?</option>
            </select>
        </label>
        <label>
            Red =:
            <select name="player_2">
                <option value="0">Een echt persoon</option>
                <option value="1">De computer speelt makkelijk</option>
                <option value="2">De computer doet een beetje gemeen</option>
                <option value="3">De computer doet gemeen</option>
                <option value="4">De computer doet belachelijk gemeen</option>
                <option value="5">De computer doet idioot gemeen, kan jij winnen?</option>
            </select>
        </label>
    </form>

    <div id="board"></div>

  </div>
</div>

MDBootstrap staff pro premium priority answered 5 years ago

Hi Alexander656,

Does this simple example fill all your developer needs?

You can read more about this component in this section of our documentation.

This is our simple material select used in our MDB package. If you have some basic problems about bootstrap I suggest you take our quick and easy to understand tutorial

If you want to use a basic select that is implemented in plain html you can read more about it there.

If you need any help I am here for you.

Best Regards, Piotr


Hi Piotr! Thank you so much for your help! I will try it tonight when I am at home (now just started working). I will let you know. Thanks


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: Any
  • Browser: Any
  • OS: Win
  • Provided sample code: No
  • Provided link: No
Tags