---
title: "How to call single click event on click multiple button and select value in dropdown according to click button using JQuery"  
description: "How to call single click event on click multiple button and select value in dropdown according to click button using JQuery"  
author: "Anonymous User"  
published: 2014-09-29  
updated: 2014-09-29  
canonical: https://www.mindstick.com/forum/2285/how-to-call-single-click-event-on-click-multiple-button-and-select-value-in-dropdown-according-to-click-button-using-jquery  
category: "jquery"  
tags: ["javascript", "jquery"]  
reading_time: 2 minutes  

---

# How to call single click event on click multiple button and select value in dropdown according to click button using JQuery

call single [click event](https://www.mindstick.com/forum/424/how-to-call-form_paint-event-on-button-click-event) and change [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) of [dropdown list](https://www.mindstick.com/forum/760/dropdown-list-open-hide-behind-another-dropdown-list-on-ie-7) according to clicked [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) usin jquery

## Replies

### Reply by Anonymous User

Hi ankit i'm try to solve your problem\
here is my html code

```
<div class="container">    <div class="row">        <br /><br />        <div class="col-md-1">            <input type="button" value="Allahabad" class="selectcity btn btn-info" id="0"/>        </div>        <div class="col-md-1">            <input type="button" value="Lucknow" class="selectcity btn btn-info" id="1"/>        </div>        <div class="col-md-1">            <input type="button" value="Kanpur" class="selectcity btn btn-info" id="2"/>        </div>        <div class="col-md-1">            <input type="button" value="Delhi" class="selectcity btn btn-info" id="3"/>        </div>    </div>    <div class="row">        <div class="col-md-4" ><br /><br />            <select id="ddl-jobcategory" style="width:100%;height:35px;">                <option>Allahabad</option>                <option>Lucknow</option>                <option>Kanpur</option>                <option>Delhi</option>            </select>        </div>    </div></div>
```

\
and here is my jquery code\

```
<script>    $(document).ready(function () {        $('.selectcity').click(function () {            var index = $(this).attr("id");            $('#ddl-jobcategory').prop("selectedIndex", index);        });    });</script>
```


---

Original Source: https://www.mindstick.com/forum/2285/how-to-call-single-click-event-on-click-multiple-button-and-select-value-in-dropdown-according-to-click-button-using-jquery

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
