Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (19 sloc) 584 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="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<script type="text/javascript" src="patterns/jquery.widget-factory.plugin-boilerplate.js"></script>
</head>
<body>
<script type="text/javascript">
$(function(){
var instance = ($('body').widgetName({
foo: false
}));
console.log(instance);
instance.widgetName('methodB');
});
</script>
</body>
</html>