Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (17 sloc) 498 Bytes
<html>
<head>
<title>jQuery Plugin Patterns</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="patterns/jquery.prototypal-inheritance.plugin-boilerplate.js"></script>
</head>
<body>
<script type="text/javascript">
$(function(){
$.plugin('myobj', myObject);
$('body').myobj({name: "John"});
var inst = $('body').data('myobj');
inst.myMethod('I am a method');
});
</script>
</body>
</html>