Код: Выделить всё
[*]
Country
[list]
[url=#]Country1[/url]
[*][url=#]Country2[/url]
[*][url=#]Country3[/url]
[/list]
Код: Выделить всё
var main = function(){
var data_start_type = "C1";
var $data_type_elem = $('[country-code='+data_start_type+']');
$('#country_select li a').text($data_type_elem.text());
$("#country_select li a").on("click", function () {
var country_selected=$(this).text();
Shiny.onInputChange('this_country', country_selected); //send selected data to the server script
});
};
$(document).ready(main);
Я нашел предложение поместить это под своим JS-кодом, но оно не устанавливает никакого значения по умолчанию.
Код: Выделить всё
$('#country_select li a')[2].click();
Подробнее здесь: https://stackoverflow.com/questions/373 ... -bootstrap
Мобильная версия