Answer the question
In order to leave comments, you need to log in
Why does Select Tag not accept Update html (jquery(selector).html) in mobile ios?
Jquery 3.4.1
From the desktop everything is fine, from the mobile (iphone5se) an empty select.
Example: https://sas2.ru/jquery-ios-select.html
eng:
Select doesnt take HTML variable in mobile ios, with picker activated. All other browsers work fine.
Select tag doesnt take (selector).HTML value in mobile ios
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input name="selectednumber" id="selectednumber" type="number" value="1" placeholder="Введите число" style=" width: 208px; ">
<select name="magicnumber" id="magicnumber" class="magicnumber" style="width:208px;">
</select>
<!--Следующий блок для проверки-->
<div id="magicnumbercheck"></div>
var numberselector = '<option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option>';
$('select.magicnumber').html(numberselector);
$("#selectednumber").keyup(
function() {
var input = $('#selectednumber').val();
//$("#magicnumber option[value='"+input+"']").attr("selected", "selected");
$("#magicnumber").val(input);
$("#magicnumbercheck").html(input);
}
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question