Difference between revisions of "Team:SSTi-SZGD/js/Notebook"

Line 41: Line 41:
 
});
 
});
 
 
 +
});
 +
 +
/*pdf禁止滑轮*/
 +
$(function(){
 +
$(".pdf").mouseover(function(){
 +
$("html").bind("mousewheel DOMMouseScroll",function(){
 +
return false;
 +
});
 +
});
 +
$(".pdf").mouseout(function(){
 +
$(".pdf").css("background","yellow");
 +
$("html").unbind("mousewheel DOMMouseScroll");
 +
});
 
});
 
});

Revision as of 10:54, 2 August 2017

/*自定义Project效果*/ $(function(){

$(".header .nav .mainnav").eq(2).hover(function(){ $(".header .nav .Project span").css("color","#FAEE0D"); },function(){ $(".header .nav .Project span").css("color","#FAEE0D"); });

});

/*跟随窗口大小的高度*/ $(function(){

var winHeight=$(window).height();

console.log(winHeight);

if(winHeight>=465){ $(".pdf").css("height",winHeight); } else{ winHeight=465; $(".pdf").css("height",winHeight); }

$(window).resize(function(){

winHeight=$(window).height();

console.log(winHeight);

if(winHeight>=465){ $(".pdf").css("height",winHeight); } else{ winHeight=465; $(".pdf").css("height",winHeight); }

});

});

/*pdf禁止滑轮*/ $(function(){ $(".pdf").mouseover(function(){ $("html").bind("mousewheel DOMMouseScroll",function(){ return false; }); }); $(".pdf").mouseout(function(){ $(".pdf").css("background","yellow"); $("html").unbind("mousewheel DOMMouseScroll"); }); });