.swipe() getting called on button click