tegansnyder / JQuery-Mobile-Slide-Menu

A sliding menu similar to Facebook and Path's approach to menu design on mobile. This is a JQuery Mobile example. DEMO URL below:
http://www.tegdesign.com/tegansnyder-JQuery-Mobile-Slide-Menu
208 stars 65 forks source link

jQuery Mobile 1.2.0 compability #7

Closed andergrim closed 12 years ago

andergrim commented 12 years ago

I found some problems in the slide menu when using it with jQuery Mobile 1.2.0 (to be honest, I haven't tried it with any older versions of jQM as I just started out implementing the slide menu in my project. The problem being that whenever you click or tap in the active page with the menu expanded the header of the page would jump to the right (by as many pixels as the width of the menu itself).

I found code in jqm.slidemenu.js that looked like a workaround (removing the class .ui-fixed-hidden on click) but this did not work for me. However, by adding the data attributes tap-toggle=false and update-page-padding=false to the page div it works as expected.

Feel free to implement the changes if it doesn't break anything else and if the behavior I introduced to the page is allright.

tegansnyder commented 12 years ago

Thanks! I will take a gander at it later this week. I do need to update it to handle 1.2 since it was just released. Thanks again!

On Thursday, October 4, 2012 at 7:22 AM, andergrim wrote:

I found some problems in the slide menu when using it with jQuery Mobile 1.2.0 (to be honest, I haven't tried it with any older versions of jQM as I just started out implementing the slide menu in my project. The problem being that whenever you click or tap in the active page with the menu expanded the header of the page would jump to the right (by as many pixels as the width of the menu itself).
I found code in jqm.slidemenu.js that looked like a workaround (removing the class .ui-fixed-hidden on click) but this did not work for me. However, by adding the data attributes tap-toggle=false and update-page-padding=false to the page div it works as expected. Feel free to implement the changes if it doesn't break anything else and if the behavior I introduced to the page is allright. You can merge this Pull Request by running: git pull https://github.com/andergrim/JQuery-Mobile-Slide-Menu master Or view, comment on, or merge it at: https://github.com/tegansnyder/JQuery-Mobile-Slide-Menu/pull/7 Commit Summary Update js/jqm.slidemenu.js Update index.html Update test.html

File Changes M index.html (8) M js/jqm.slidemenu.js (6) M test.html (8)

Patch Links https://github.com/tegansnyder/JQuery-Mobile-Slide-Menu/pull/7.patch https://github.com/tegansnyder/JQuery-Mobile-Slide-Menu/pull/7.diff

— Reply to this email directly or view it on GitHub (https://github.com/tegansnyder/JQuery-Mobile-Slide-Menu/pull/7).

whelaro commented 12 years ago

I also had the same issue with jQuery Mobile 1.1.0. andergrim's changes fixed the issue and I haven't personally noticed anything awry otherwise.