---
title: "All bootstrap dropdown show the same item"  
description: "All bootstrap dropdown show the same item"  
author: "Anonymous User"  
published: 2014-10-04  
updated: 2014-10-06  
canonical: https://www.mindstick.com/forum/2297/all-bootstrap-dropdown-show-the-same-item  
category: "jquery"  
tags: ["jquery", "javascript", "bootstrap"]  
reading_time: 1 minute  

---

# All bootstrap dropdown show the same item

i'm using [bootstrap](https://www.mindstick.com/articles/1555/image-viewer-using-bootstrap-carousel) [dropdown](https://www.mindstick.com/articles/263/ajax-toolkit-dropdownextender-in-asp-dot-net) and some [jquery code](https://www.mindstick.com/forum/157821/write-a-jquery-code-that-selects-all-the-checkboxes-in-a-form-when-a-select-all-button-is-clicked)my [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) is when i'm change the [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) of one dropdown then all dropdown change value automatick\

```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"/>
```

\

here is [javascript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript) code:\

```
<script>    $(function () {        $(".dropdown-menu li a").click(function () {            $(".btn:first-child").text($(this).text());            $(".btn:first-child").val($(this).text());        });    });</script>
```

here is bootstrap dropdown code:

```
<div class="row">        <div class="col-md-6">            <div class="dropdown">                <button class="btn btn-default dropdown-toggle" type="button" id="ddlForwardTo" data-toggle="dropdown">                    Select a Forward To                    <span class="caret"></span>                </button>              <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">                <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>                <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>                <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>              </ul>            </div>        </div>        <div class="col-md-6">            <div class="dropdown">                <button class="btn btn-default dropdown-toggle" type="button" id="ddlManufacturing" data-toggle="dropdown">                    Select a Manufacturing contact                    <span class="caret"></span>                </button>              <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">                <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>                <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>                <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>              </ul>            </div>        </div>    </div>
```

i'm want to not change value of all dropdown onchnage one dropdown value

\

## Replies

### Reply by Mark M

read this linkhttp://www.mindstick.com/blog/639/Dropdownlist%20using%20BootStrap%20in%20ASP%20Net\

### Reply by Anonymous User

try this [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii):

```
<script>    $(function () {        $(".dropdown-menu
li a").click(function () {            $(this).parents('.dropdown').children('.btn').text($(this).text());            $(this).parents('.dropdown').children('.btn').val($(this).text());        });    });</script>
```


---

Original Source: https://www.mindstick.com/forum/2297/all-bootstrap-dropdown-show-the-same-item

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
