Skip to content

Instantly share code, notes, and snippets.

@Heavyblade
Created March 8, 2013 21:21
Show Gist options
  • Select an option

  • Save Heavyblade/5119973 to your computer and use it in GitHub Desktop.

Select an option

Save Heavyblade/5119973 to your computer and use it in GitHub Desktop.
prubea
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>nuevo</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
function hideHola() { $("#hola").hide() }
$(document).ready(function(){
window.hola = 500;
$(".actions").click(function(e){
window.hola = setTimeout("hideHola();", 3000) ;
return(false)
})
$("#hola").click(function(e) {
console.log("pase por ca")
clearTimeout(window.hola);
});
});
</script>
<style type="text/css">
#hola {width: 200px; height: 200px; background-color: red;}
</style>
</head>
<body>
<a class="actions" href="#">Hola Mundo</a>
<br/>
<br/>
<br/>
<div id="hola">
Hola
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment