Created
February 29, 2012 22:52
-
-
Save arbales/1945151 to your computer and use it in GitHub Desktop.
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
<html> | |
<head> | |
<script src="/path/to/jquery.js" type="text/javascript"></script> | |
<script src="/path/to/jquery.kittenize.js" type="text/javascript"></script> | |
<script src="/path/to/sabrina.js" type="text/javascript"></script> | |
<title>Sabrina</title> | |
</head> | |
<body> | |
<h1>Hi!</h1> | |
<p class='kittens'>Kittens go here.</p> | |
<script type='text/javascript'> | |
// sometimes javascript wants to live in your html file. only sometimes. | |
// note how I don't need to check if the document is ready, | |
// since it's already loaded by the time we get here. | |
alert('kittens are coming...'); | |
</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
// pass a function to jquery that will execute when your page is ready. | |
$(function(){ | |
// select <class='kittens'> elements and kittenize them. | |
$('.kittens').kittenize({ | |
count: 5, | |
type: 'cheetah', | |
violent: true | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment