这很可能很容易,但我很挣扎
$(window).bind("load resize", function(){
var wH = $(window).height();
var wW = $(window).width();
var hwH = (wH) / 2;
// ---- slide size w+h ----
$('.slide').css({'height': (wH) +'px', 'width': (wW) +'px'});
$('#features') .css({'height': (wH+hwH) + 'px'});
// ---- size/min-size for featureItem div's ----
$('.featureItem') .css({'height': (wH * 1.5) / 5 - 17 +'px'});
});// end resize.function
我想为#features 添加一个条件语句
if$(wH+hwH < 735) {
$('#features').css({'height': 735 +'px'});
}
else {
$('#features').css({'height': (wH+hwH) + 'px'});
}
提前致谢