Skip to content

Instantly share code, notes, and snippets.

@arbales
Created February 29, 2012 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arbales/1945151 to your computer and use it in GitHub Desktop.
Save arbales/1945151 to your computer and use it in GitHub Desktop.
<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>
// 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