How can i swipe list item using javascript?


I want to trigger swipe event in javascript, how is that possible ?


Are you asking to have an function run on swipe or to simulate the swipe gesture?


i am asking to simulate the swipe gesture.

Swipeable item list how to swipeback the row after event trigged

Hmm good question.

I guess a better question would be to ask what event are you trying to trigger?


I want to close list-item when i click on ion-option-button. It should hide options button and reset the list item state (i.e. Swipe to the right automatically).


Makes sense. Yes this is possible, see my demo.

 $scope.edit = function(item) {
    alert('Edit Item: ' +;

Swipe-back to option buttons

great @mhartington. Thanks a lot man.


I have an updated codepen with a directive that will close the option button if you attempt to scroll as well.


is there something like $ionicListDelegate.openOptionButtons()?


If it’s not in the docs, then nope :grin:


:smiley: how can i implement it ? i damn need it :frowning:. I am not good in angular.


Is there anyway to force an animation of closeOptionButtons()?


Hi men, Did you get it (openOptionButtons)?

Thanks in advance, Nicholls


I managed to simulate the event via javascript when a click event happends on an ion-item

Basically, I managed the click evento so it would add the same translate3d transformation. Once you put the transformation, ionic’s css manages the rest.


How do open ion-option-button?

Very nicee! Thanks for your response my friend! :smiley:

This is my example with a hold gesture:


Very helpful thread! Thanks guys.