backbone.js - Back buttons in jQuery Mobile with Backbone do not work properly -
i using jquerymobile , backbone , having problems custom or dynamically generated buttons not going in history properly. using data-rel="back"
attribute on anchor tags described in documentation: http://view.jquerymobile.com/1.3.2/dist/demos/widgets/headers/
my button code follows:
<a href="#" data-rel="back" data-icon="arrow-l" data-iconpos="notext"></a>
when click button doesn't seem use data-rel="back"
functionality @ , instead goes page specified in href
attribute, in cases '#' or empty.
this can confirmed hard-coding different href
value - button go page, , not previous page in history it's supposed to.
i suspect conflict between backbone , jquery mobile , configurations necessary them work nicely (let backbone handle page transitions), not know how around it.
as described in jqm docs had set following in mobile-config
file:
$.mobile.ajaxenabled = false; $.mobile.linkbindingenabled = false; $.mobile.hashlisteningenabled = false; $.mobile.pushstateenabled = false; $.mobile.changepage.defaults.changehash = false;
note: i've reviewed many of posts on subject on before posting , there doesn't seem suitable solution presented in of responses.
i figured out. combination of implementing solution found here: jquery mobile + backbone.js: page transition when going back
and
adding attribute 'data-bypass' anchor tags wanted bind custom events using piece of code backbone boilerplate project handle relative urls.
Comments
Post a Comment