<div data-role="page" id="genlist-swipe" data-add-back-btn="true">
<script type="text/javascript">
- var openSwipe = function()
- {
+ var openSwipe = function() {
$("#sw").swipe("open");
}
- var closeSwipe = function()
- {
+ var closeSwipe = function() {
$("#sw").swipe("close");
}
+
+ $("#covertest").bind("animationstart", function (ev) {
+ console.log("Swipe cover's animation is start.");
+ });
+
+ $("#covertest").bind("animationend", function (ev) {
+ console.log("Swipe cover's animation is complete.");
+ });
+
+
</script>
<div data-role="header" data-position="fixed">
<h1>Swipe lists</h1>
</div>
</li>
<li data-role="swipe" id="sw">
- <div data-role="swipe-item-cover">
+ <div data-role="swipe-item-cover" id="covertest">
Test API - Swipe2
</div>
- <div data-role="swipe-item">
+ <div data-role="swipe-item" >
<div data-role="button" data-inline="true">Twitter</div>
<div data-role="button" data-inline="true">Facebook</div>
</div>
duration: 'normal',
queue: true,
complete: function () {
- cover.trigger('animationComplete');
+ cover.trigger('animationend');
}
};
cover.stop();
cover.clearQueue();
- cover.trigger('animationStart');
+ cover.trigger('animationstart');
cover.animate( { left: leftPercentage + '%' }, animationOptions );
if ( leftPercentage == 0 ) {
item.animate({ opacity: 0 }, "slow");