jquery - what should use instead of .show() and .hide() in microsoft Internet explorer browser? -
i want show option values have class containing german when click german button , viceversa english ..
below codes working fine in chrome . want see result in internet explorer . how acheive ?
note :- while running in ie .hide changes display:none , , .show changes display:inline
$(".german").hide(); $(".english").show();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <select id="num"> <option value="1" selected class="english"> one</option> <option value="2" class="english"> two</option> <option value="1" selected class="german"> one(german)</option> <option value="2" class="german"> two(german)</option> </select>
first add ready() method in script
$( document ).ready( function() { $(".german").hide(); $(".english").show(); });
or
$( document ).ready( function() { if($.browser.msie){ $('.english').css({"visibility":"visible"}); } });
Comments
Post a Comment