Skip to content

Instantly share code, notes, and snippets.

@aslansky
Created May 24, 2011 20:29
Show Gist options
  • Save aslansky/989597 to your computer and use it in GitHub Desktop.
Save aslansky/989597 to your computer and use it in GitHub Desktop.
jQuery('element-identifier').plugin({
option1: 'value1',
option2: 'value2',
option3: 'value3'
});
<body>
<div data-plugin="plugin"></div>
<script type="text/javascript">
$('body').initPlugins();
</script>
</body>
<div data-plugin="slideshow" data-width="200" data-height="300" data-image-count="10"></div>
jQuery(Element mit dem Data-Attribute).slideshow({
width: 200,
height: 200,
imageCount: 10
});
<body>
<div id="content">
<a href="#">Neuen Inhalt laden</a>
</div>
<script type="text/javascript">
jQuery('#content a').click(function () {
jQuery('#content').loadAndInit('neuer-content.html', function () {
// tue irgendwas nach dem laden
});
});
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment