问题是jQuery('#form-row-rapper-price_bin').hide()
不运行,除非我从“form_auction_type”中选择另一个值并返回到较旧的值。jQuery准备好并更改
我需要的脚本上改变下拉框“form_auction_type”的值在页面加载运行,也
jQuery('#form_auction_type').change(function(e) {
if(jQuery('#form_auction_type').val() == '2'){
jQuery('#form-row-rapper-price_bin').show();
jQuery('#form-row-rapper-price_current').hide();
jQuery('#form-row-rapper-price_reserve').hide();
} else {
jQuery('#form-row-rapper-price_bin').hide();
jQuery('#form-row-rapper-price_reserve').show();
jQuery('#form-row-rapper-price_current').show();
}
});
,使其律位更容易改变从
jQuery('#form_auction_type').change(function(e) {
这条线
到
jQuery('#form_auction_type').ready(function(e) {
修复我的问题,但下拉菜单不工作了!
请提供相关的HTML。没有足够的信息来回答这个问题。 – Popnoodles 2015-02-23 18:46:57