开发者

browser not support my Jquery Code

开发者 https://www.devze.com 2023-03-31 08:29 出处:网络
i have this code for select city & country : $(\'select[name=province]\').change(function(){ var province_selected = $(this).val();

i have this code for select city & country :

$('select[name=province]').change(function(){
    var province_selected = $(this).val();
    $("select[name开发者_开发知识库=city] option").css('display','none');
    $('select[name=city] option[owner*='+province_selected+']').css('display','block') ;
    $("select[name=city]").fadeIn('slow')

})

my browser is ie8 , but not support "select[name=city] **option**" command for select,

TanX from all


This is probably because owner isn't valid HTML element attribute. Change it to data-owner.

and there's syntax error

$("select[name=city].fadeIn('slow')");

should be

$("select[name=city]").fadeIn('slow')
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号