You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/public/javascripts/educoder/trainings.js

32 lines
898 B

document.write("<link href='//at.alicdn.com/t/font_653600_rr8l5v2aaym.css' rel='stylesheet' type='text/css'/>");
/*上划菜单的显示与隐藏,阻止冒泡*/
$(function(){
$("body").on("click",function(){
hideNav($(".downNav"));
})
$("[NavShow],.downNav").on("click",function(e){
e.stopPropagation();
})
})
function showNav(btn, navDiv, direction) {
btn.on('click', function () {
if (direction == "down") {
navDiv.css({
bottom: "0px",
transition: "bottom .5s"
});
$("body").append('<div class="navMenuBack"></div>');
}
})
}
function hideNav(btn) {
btn.css({
bottom: "-100%",
webkitTransition:"bottom .5s",
oTransition:"bottom .5s",
mozTransition:"bottom .5s",
transition: "bottom .5s"
});
$(".navMenuBack").remove();
}