1. INCLUDE CSS AND JS FIlES
<link rel="stylesheet" type="text/css" href="css/jquery.hammerousel.css">
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery-migrate-1.2.1.min.js"></script>
<script src="js/jquery-ui-1.10.3.min.js"></script>
<script src="js/hammer.min.js"></script>
<script src="js/jquery.hammerousel.js"></script>
<script src="js/modernizr.js"></script>
2. HTML
<div class="hammerousel">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
3. JAVASCRIPT
$(function() {
var $hammerousel = $('.hammerousel').hammerousel(<options>);
});
4. OPTIONS
{
horizontal: {
enabled: true,
threshold: .5
},
vertical: {
enabled: true,
threshold: 0
}
}
5. METHODS
Example:
$hammerousel.hammerousel('on', param1, param2, etc);
.hammerousel('on', selector, callback, distance)
Bind a live event to Hammerousel using a custom event parameter
Parameters
selector: string
callback: function
distance: number
Returns: Event Name
.hammerousel('one', selector, callback, distance)
Bind an event that will only trigger once per element per event type
Parameters
selector: string
callback: function
distance: number
Returns: Event Name
6. EVENTS
ShowPane::After
$('.hammerousel').on('Hammerousel::beforeShowPane', function(event, type));
ShowPane::Before
$('.hammerousel').on('Hammerousel::afterShowPane', function(event, type));