Title: Set the value of second Bootstrap slider based on change the value of first bootstrap slider dynamically
Tags: jquery;twitter-bootstrap
Question: I have implemented two bootstrap slider in my project. and I want to change the value of second slider based on slide the first slider dynamically. but it is not working.

How I can achieve this?

My HTML code:-

```<td&gt;<input id="ex1" type="text" value="" class="slider form-control" data-slider-min="0" data-slider-max="1500" data-slider-step="5" data-slider-value="1000" data-slider-orientation="vertical" data-slider-selection="after" data-slider-tooltip="show" data-slider-id="red"&gt;</td&gt;

<td&gt;<input id="ex2" type="text" value="" class="slider form-control" data-slider-min="0" data-slider-max="2000" data-slider-step="5" data-slider-value="1200" data-slider-orientation="vertical" data-slider-selection="after" data-slider-tooltip="show" data-slider-id="blue"&gt;</td&gt;
```

My Jquery Code as follow: but none of following method is working

```$("#ex1").on("slide", function() {
    $("#ex2").attr('data-slider-value', '200'); 
});


$("#ex1").on("slide", function() {
    $("#ex2").val('200');   
});


$("#ex1").on("slide", function() {
    $("#ex2").attr('value', '200');
});
```

Comment: Does the event fire? E.g. test it with an alert for example.

Comment: This should help you: http://stackoverflow.com/questions/33658932/bootstrap-slider-set-value-issue

Comment: Well you should be able to remove it...

Comment: Yes @frankenapps, Event is working

Comment: Thanks @Frankenapps its working fine. but using this code there are showing one extra slider in my page.

Here is the accepted answer: Now I have fixed my problem like this:

```$("#ex1").on("slide", function() {  
var minSliderValue = $("#ex2").data("slider-min");
var maxSliderValue = $("#ex2").data("slider-max");

$('#ex2').slider({
 value : 0,
 reversed:true,
 formatter: function(value) {
 return 'Current value: ' + value;
 }
});

$("#aqua").hide();//hide duplicate slider based on id

var val = Math.abs(parseFloat(ownesAmt, 10) || minSliderValue);
this.value = val &gt; maxSliderValue ? maxSliderValue : val;
$('#ex2').slider('setValue', val);
```

});



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 5, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:06/29/16', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<jquery><twitter-bootstrap>', 'Title': 'Set the value of second Bootstrap slider based on change the value of first bootstrap slider dynamically', 'ViewCount': 513, 'id': 38093199, 'user_AboutMe': '', 'user_AccountId': 3903559.0, 'user_DisplayName': 'Manoj Kumar', 'user_Reputation': 292.0, 'user_Views': 17.0, 'user_id': 3230757.0}}