function classJudegSize1() {
var reallySize=parseInt($(".img_box")[1].naturalWidth);
$(window).on("resize", function () {
var img_box=parseInt($(".img_box:eq(1)").css("width")) ;
var mainWarp=parseInt($(".main_wrap").css("width"));
if ( img_box>=mainWarp){
var img_box=parseInt($(".img_box:eq(1)").css("width")) ;
var mainWarp=parseInt($(".main_wrap").css("width"));
$(".img_box:eq(1)").css("width", mainWarp);
$(".img_box:eq(1)").mouseover(function () {
$(".img_bg:eq(1)").show();
});
$(".img_bg:eq(1)").mouseout(function () {
$(this).hide();
})
}if(reallySize< mainWarp){
$(".img_box:eq(1)").css("width", reallySize);
$(".img_box:eq(1)").mouseover(function () {
$(".img_bg:eq(1)").hide();
});
$(".img_bg:eq(1)").mouseout(function () {
$(this).hide();
})
}
});
}
trigger除非下注册的resize事件
$(window).on("resize", function () {.....}).trigger('resize')