Getting Started
Installation
Include CSS
Include CSS file into your HTML head::
copy
<link rel="stylesheet" href="DoZoom/Do.Zoom.min.css">
Include JS
Include jQuery and
Do.Zoom.min.js
into the footer.
copy
<script src="jquery.min.js"></script>
<script src="DoZoom/Do.Zoom.min.js"></script>
Set HTML
You don't need any special markup. there are two options without child or with child
copy
<!-- With child -->
<div class="doZoom">
<div class="item" bgsrc="background.jpg"> Any Content </div>
</div>
<!-- Without child -->
<div class="doZoom" bgsrc="background.jpg"> Any Content </div>
With Child option you should add
noChild:false
andincludeParent
.
Using the plugin
For non-AMD just use the plugin the same way they always have
copy
$(document).ready(function(){
$('.doZoom').doZoom();
});
For AMD you don't need to use shim
copy
require(['jquery', 'jquery.doZoom'], function($) {
$('.doZoom').doZoom();
});