i have a javascript widget that will display a data chart.. and i have an dropdown box which gives the user the ability to change the theme. so when the user selects a theme it should change and show the user the new theme.
Widget code:
<script type="text/javascript">
new TradingView.widget({
"width": 500,
"height": 400,
"interval": "1",
"timezone": "Etc/UTC",
"theme": "White",
"style": "2",
});
</script>
HTML/JS code
<select>
<option value="moonlight">Moon</option>
<option value="darkness">Dark</option>
</select>
<script>
$(document).on('change','.theme',function(){
alert(this.value);
});
</script>
How do i get add the this.value to the widget JS code theme parameter?
jQuery.