Created
September 4, 2012 15:04
-
-
Save eamexicano/3622094 to your computer and use it in GitHub Desktop.
El signo de $ es una abreviación de jQuery
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
<!-- $ es una abreviación de jQuery. --> | |
<!-- jQuery en la cabeza --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<style> | |
body {background: #eee; font-family: sans-serif; margin: 0 auto; width: 800px;} | |
#click {width: 200px; height: 100px; margin: 49% 40%; border: 1px dashed black; background: #eee; line-height: 100px; text-align: center;} | |
</style> | |
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js'></script> | |
<script> | |
jQuery(document).ready(function() { | |
/* | |
jQuery('#click').click(function() { | |
alert('Un mensaje'); | |
}); | |
*/ | |
$('#click').click(function() { | |
alert('Un mensaje'); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div id='click'> | |
Dale click | |
</div> | |
</body> | |
</html> | |
<!-- jquery en el cuerpo --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<style> | |
body {background: #eee; font-family: sans-serif; margin: 0 auto; width: 800px;} | |
#click {width: 200px; height: 100px; margin: 49% 40%; border: 1px dashed black; background: #eee; line-height: 100px; text-align: center;} | |
</style> | |
</head> | |
<body> | |
<div id='click'> | |
Dale click | |
</div> | |
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js'></script> | |
<script> | |
jQuery(document).ready(function() { | |
/* | |
jQuery('#click').click(function() { | |
alert('Un mensaje'); | |
}); | |
*/ | |
$('#click').click(function() { | |
alert('Un mensaje'); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment