Add a touch navigation to whale nivo by jquery mobile
Permalink Browser Info Environment
This is not a perfect solution for adding touch navigation to nivo slider, but it just works.
1- Download "Jquery Mobile" (http://jquerymobile.com/) and add the js file to \packages\whale_nivo_slider\blocks\whale_nivo_slider\js\
2- add this code to your \packages\whale_nivo_slider\blocks\whale_nivo_sliderview.php file [at the end of file, after initiating of nivo, line 48]
1- Download "Jquery Mobile" (http://jquerymobile.com/) and add the js file to \packages\whale_nivo_slider\blocks\whale_nivo_slider\js\
2- add this code to your \packages\whale_nivo_slider\blocks\whale_nivo_sliderview.php file [at the end of file, after initiating of nivo, line 48]
$('<?php echo "#nivo-slider-".$bID; ?>').bind( 'swipeleft', function( e ) { //alert("left"); $('a.nivo-nextNav').trigger('click'); e.stopImmediatePropagation(); return false; }); $('<?php echo "#nivo-slider-".$bID; ?>').bind( 'swiperight', function( e ) { //alert("right"); $('a.nivo-prevNav').trigger('click'); e.stopImmediatePropagation(); return false; });
Type: | Discussion |
---|---|
Status: | New |