Created
March 17, 2015 18:24
-
-
Save Bijesse/9948af873931a90db0e6 to your computer and use it in GitHub Desktop.
Help Box jQuery // source http://jsbin.com/hipoto
This file contains hidden or 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> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>Help Box jQuery</title> | |
<style id="jsbin-css"> | |
#help { | |
position: absolute; | |
background: red; | |
width: 200px; | |
height: 150px; | |
top: 50%; | |
left: 50%; | |
margin-left: -100px; | |
margin-top: -75px; | |
} | |
#outer-help { | |
position: fixed; | |
left:0; | |
right:0; | |
top:0; | |
bottom:0; | |
} | |
html, body { | |
height: 100%; | |
width: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="outer-help"><div id="help">MY PROJECT IS AWESOME</div></div> | |
<script id="jsbin-javascript"> | |
$(function() { | |
$('#outer-help').hide(); | |
$(document.body).keypress(function(e) { | |
if(e.keyCode === 63) { | |
$('#outer-help').show(); | |
$('#outer-help').click(hideHelp); | |
} | |
}); | |
}); | |
function hideHelp() { | |
$('#outer-help').hide(); | |
} | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//code.jquery.com/jquery-1.11.1.min.js"><\/script> | |
<meta charset="utf-8"> | |
<title>Help Box jQuery</title> | |
</head> | |
<body> | |
<div id="outer-help"><div id="help">MY PROJECT IS AWESOME</div></div> | |
</body> | |
</html></script> | |
<script id="jsbin-source-css" type="text/css">#help { | |
position: absolute; | |
background: red; | |
width: 200px; | |
height: 150px; | |
top: 50%; | |
left: 50%; | |
margin-left: -100px; | |
margin-top: -75px; | |
} | |
#outer-help { | |
position: fixed; | |
left:0; | |
right:0; | |
top:0; | |
bottom:0; | |
} | |
html, body { | |
height: 100%; | |
width: 100%; | |
margin: 0; | |
padding: 0; | |
}</script> | |
<script id="jsbin-source-javascript" type="text/javascript">$(function() { | |
$('#outer-help').hide(); | |
$(document.body).keypress(function(e) { | |
if(e.keyCode === 63) { | |
$('#outer-help').show(); | |
$('#outer-help').click(hideHelp); | |
} | |
}); | |
}); | |
function hideHelp() { | |
$('#outer-help').hide(); | |
}</script></body> | |
</html> |
This file contains hidden or 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
#help { | |
position: absolute; | |
background: red; | |
width: 200px; | |
height: 150px; | |
top: 50%; | |
left: 50%; | |
margin-left: -100px; | |
margin-top: -75px; | |
} | |
#outer-help { | |
position: fixed; | |
left:0; | |
right:0; | |
top:0; | |
bottom:0; | |
} | |
html, body { | |
height: 100%; | |
width: 100%; | |
margin: 0; | |
padding: 0; | |
} |
This file contains hidden or 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
$(function() { | |
$('#outer-help').hide(); | |
$(document.body).keypress(function(e) { | |
if(e.keyCode === 63) { | |
$('#outer-help').show(); | |
$('#outer-help').click(hideHelp); | |
} | |
}); | |
}); | |
function hideHelp() { | |
$('#outer-help').hide(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment