You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most frameworks load pages into the dom and when the user navigates away from that page it's removed from the dom and replaced with the page the user wants and when that happens the swipe hander(s) for the page being discarded are useless and just taking up memory. What's worse is that when the user navigates back to that page, the swipe handlers get set again.
So, what's the best way to remove a swipe handler from a page? Do you @mattbryson check to see if a swipe hander is already in place and overwrite it with the new handler? Do you @mattbryson ignore the second swipe handler? If we set a second swipe handler on an element do you overwrite the first one?
$("#element").swipe("destroy");
According to the documentation here when you employ the "destroy" method you "Destroy the swipe plugin completely. To use any swipe methods, you must re initialise the plugin."
Destroying the swipe plugin completely is a bit much and also doesn't appear to be true.
I think this needs to be cleared up (especially in the documentation).
The text was updated successfully, but these errors were encountered:
Most frameworks load pages into the dom and when the user navigates away from that page it's removed from the dom and replaced with the page the user wants and when that happens the swipe hander(s) for the page being discarded are useless and just taking up memory. What's worse is that when the user navigates back to that page, the swipe handlers get set again.
So, what's the best way to remove a swipe handler from a page? Do you @mattbryson check to see if a swipe hander is already in place and overwrite it with the new handler? Do you @mattbryson ignore the second swipe handler? If we set a second swipe handler on an element do you overwrite the first one?
According to the documentation here when you employ the "destroy" method you "Destroy the swipe plugin completely. To use any swipe methods, you must re initialise the plugin."
Destroying the swipe plugin completely is a bit much and also doesn't appear to be true.
I think this needs to be cleared up (especially in the documentation).
The text was updated successfully, but these errors were encountered: