tags:

views:

23

answers:

1

hello - i know how to call prev/next normally but i want it to open the next slide if the mouse is over half way of the screen and previous if less then half way over.

can't seem to find $.cycle.next() or similar. Any ideas welcome...!

ie

$('div.pageImages').cycle({
        height  :   '600px',
        width   :   '600px',
        timeout :   0,
        speed   :   400,
        before  :   onBefore,
        after   :   onAfter

    });  

$('div.pageImages img').bind('click',function(e){
    var ww = $(window).width();
    if(!$(this).attr('href')) $()(e.pageX < (ww/2) ? **CYCLE_PREVIOUS** : **CYCLE_NEXT**);
    alert(e.pageX);

});
A: 

ok - this worked! need v2.88 of cycle

$('#pageImages').cycle({
            height  :   '600px',
            width   :   '600px',
/*          next    :   'div.pageImages', */
            timeout :   0,
            speed   :   400,
            before  :   onBefore,
            after   :   onAfter

        });

        $('div.pageImages img').bind('click',function(e){
            var ww = $(window).width();
            if(!$(this).attr('href')) $(e.pageX < (ww/2) ? $('#pageImages').cycle('prev') : $('#pageImages').cycle('next'));
        });
daniel Crabbe