handling added for if the html tag is used as the swipe element