dgileadi / zepto-page-transitions

HTML5 Page Transitions similar to JQuery Mobile page transitions, but standalone (13k) and using Zepto.js
167 stars 46 forks source link

Duplication of HTML Outside of "Page" Divs #38

Closed timminss closed 10 years ago

timminss commented 10 years ago

Thanks for this library dgileadi - it's really great. I have one small issue I am struggling to iron out however.

I have a mobile menu which lies outside #container (a div which contains each of the "pages".).

When I use the $(document).transition function, sometimes the header HTML gets duplicated.

Is there something I'm doing wrong here? Is there any way to have a "persistent" div, which the library ignores, and loads on all pages just once?

Just to clarify: the mobile menu is only in the page once, not copied/pasted into each of the page elements.

Your help would be greatly appreciated!

Cheers.

dgileadi commented 10 years ago

Can you provide an HTML file that shows the issue?

timminss commented 10 years ago

Hi David,

Apologies for the false alarm on this one - I solved the issue and should have posted back. I was creating links, and making handlers in javascript for their cilck() events. Basically:

.click(){ //do some stuff //transition to another page }

Having href="#" seemed to cause the issue. Removing the href tag and just using css (cursor: pointer;) was my workaround.

Thanks again for your great library!

Sean

dgileadi commented 10 years ago

Glad you solved it!