简体   繁体   中英

Links not working after disabling IScroll

When I initialize IScroll with click property:

var myScroll = new IScroll('#wrapper', { click: true });

And then try to disable IScroll:

myScroll.disable();

I have an issue where all the links don't work anymore .

Here is a simple jsfiddle (based on IScroll demo) showing what I mean:
http://jsfiddle.net/gregmatys/Dxw6r/2/

Catch the URL and trigger links by jquery:

var url = $(this).attr('href');
$('#scroller a').on(click, function() {
    window.open(url, '_blank');
});

Updated fiddle http://jsfiddle.net/Dxw6r/3/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM