Just attaching the FastButton to the body instead of each component might be difficult: the handler would have to compute the right target mode. Using FastButton for each list element might be much easier.
For the backbutton, using touch-even could be realized as follow:
==== old code ====
a.onclick = function (e) {
if (self._pageStack.depth() > 1)
self._pageStack.pop(); e.preventDefault();
}.bind(self);
};
=== new code ===
new FastButton(a,function (e) {
if (self._pageStack.depth() > 1)
self._pageStack.pop(); e.preventDefault();
};
});
(remark: bind(self) is not called anymore. It that behavior must be kept, the FastButton constructor should be extended with a "self" argument.)
Just attaching the FastButton to the body instead of each component might be difficult: the handler would have to compute the right target mode. Using FastButton for each list element might be much easier.
For the backbutton, using touch-even could be realized as follow:
==== old code ==== pageStack. depth() > 1) _pageStack. pop();
e. preventDefault( );
a.onclick = function (e) {
if (self._
self.
}.bind(self);
};
=== new code === a,function (e) { pageStack. depth() > 1) _pageStack. pop();
e. preventDefault( );
new FastButton(
if (self._
self.
};
});
(remark: bind(self) is not called anymore. It that behavior must be kept, the FastButton constructor should be extended with a "self" argument.)