Last active
October 8, 2015 06:32
-
-
Save yangkun/7ec739992b9f19a8f74b to your computer and use it in GitHub Desktop.
[html] bootstrap-skeleton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ko"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>delay</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap-theme.min.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css"> | |
<style> | |
#box {width: 100px; height: 100px; background-color: #000;} | |
#box2 {width: 100px; height: 500px; background-color: blue;} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div id="box"></div> | |
<div id="box2"></div> | |
</div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script> | |
<script> | |
$(function(){ | |
var menuTimer = false; | |
$('#box').hover(function(){ | |
menuTimer = setTimeout(function(){ | |
$('#box2').slideUp(); | |
}, 3000); | |
},function(){ | |
if(menuTimer) clearTimeout(menuTimer); | |
$('#box2').slideDown(); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment