Saturday, 28 September 2013

hashchange function and jQuery mobile conflict

hashchange function and jQuery mobile conflict

I'm currently having some problems combining a hashchange function I have
set up and jQuery mobile. I've never used jQuery mobile before, but it
seemed the best solution to achieve a 'slideup' page transition, i.e.
sliding the whole page on transition.
I also have a hashchange function set up, in combination with the isotope
plugin to add content to the grid, attach a hash to it, thus allow you to
navigate to it via a url.

Here's an example page I've set up to demonstrate my problem:
http://nealfletcher.co.uk/transition/

Firstly click on the 'hash click' block, loads the relevant content in,
attaches a hash, BUT navigating to this hash url greets you with the
jquery mobile loading gif. Also clicking on the 'transition click' brings
in the new page correctly but clicking on the 'news hash click' attaches a
hash to the url as it should, but again navigating to this url greets you
with the jquery mobile spinning gif as /news is being replaced with
#news-01 instead of /news/#news-01.

Basically I'm trying to find a solution where both my hashchange function
and my jquery mobile page transitions can work in conjunction with each
other without conflict, if at all possible. I'm struggling with this one,
any suggestions would be greatly appreciated!

No comments:

Post a Comment