我在 jsfiddle 上有我的代码,它有 2 个 div,用户可以通过单击 div 选择功能。在对面的 div 中,我有相同的元素但隐藏了。我怎样才能替换隐藏类?
这是我想出的:
$("#Label1").click(function () {
$(this).find('.feature-options1').addClass('hidden');
$(this).parent().closest('.feature-container').prev().find('#SelectedFeatures').find('#Label2').removeClass('hidden');
});
最佳答案
这是:
$(this).find('.feature-options1').hide();
$('#label2').find('.feature-options1').show();
你想达到什么目的?
关于javascript - Jquery隐藏div和显示div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24735553/