我似乎无法弄清楚我的 if 有什么问题,有人可以帮助我吗
$("#tablet_windows").on('click', function(){
$( ".demo-divs .span3" ).each(function( index ) {
var that = $(this);
if(!that.hasClass('opacity')) {
//this line is wrong
that.find('.attributes-container .tablet_windows').length == 0; {
that.toggleClass('opacity');
that.find('.rating').toggleClass('opacity');
}
}
});
});