mbui.define([], function (exports) { $('body').append('
'); $('.fixed-bar-btn').click(function () { $(this).toggleClass('active'); return $('.fixed-bar-item').toggleClass('open'); }); $('.fixed-bar-item').on('click','a',function(e){ e.preventDefault(); let href=$(this).attr('href'); location.replace(href); }) var startX, startY, moveX, moveY; var browserWidth = $(window).width(); var browserHeight = $(window).height(); var $button = $('.mbui-fixed-bar'); $button.on('touchstart', function(e){ startX = e.touches[0].pageX - parseInt($button.css('left')); startY = e.touches[0].pageY - parseInt($button.css('top')); $button.on('touchmove', function(e){ e.preventDefault(); moveX = e.touches[0].pageX - startX; moveY = e.touches[0].pageY - startY; if(moveY>100 && moveY