Problem with jqtouch-jquery iPad splitscreen app!

60 views
Skip to first unread message

Manmade

unread,
Feb 11, 2012, 9:52:31 AM2/11/12
to phonegap
I have made an iPhone app with jqtouch and jquery (and it works great)
that I converted to an iPad design that I found here:
https://github.com/senchalabs/jQTouch/issues/229

You can see my live demo here: http://www.manmade.se/iphone/hotell/index_ipad.html

The problem I get is that if I click a menulink and load a page and
then click the same link again it loads the page again and then I cant
click any other links, they stop working.

I load all my pages as separate ajax pages, and the pages are .asp
pages that gets it content from the database.
So I need to set cacheGetRequests to false in the jqtouch.js file
otherwise the new content isnt visible, than it just loads the page
from the memory.

If I set cacheGetRequests to true then when I click a link it loads
the page and if I click again, then it doesnt load the page again, and
all other links work as they should.
This is how it should work, but it doesnt if I set cacheGetRequests to
false.

So I guess that I have to with the history memory in the jqtouch.js
file.

I tested a iPad demo from beedesk that you can find here:http://
www.manmade.se/iphone/beedesk/demos/main/index.html and I set
cachegetrequest to false in that one and it worked as it should. The
problem is that I cant just use his version, because he has made so
many other changes that it doesnt work with my other codes.


The guy that made the beedesk one says:
"History management improvement is required by split-view, because
with split-view, you have two views that can be navigate
independently."

I have looked and tested different things from his jqtouch.js file,
but I dont really understand where it is handling the load of a second
click on the link!?

I would pay anybody that comes up with a solution, because if I cant
fix this problem the hole iPad design is wortless.
Any help, really appreciated, thanks!

Kerri Shotts

unread,
Feb 11, 2012, 4:18:42 PM2/11/12
to phon...@googlegroups.com
Did you figure this out? Hem/Rum reload correctly no matter how many times I click on them now. (The others don't, though.)

I did trace to some degree through the code, and it seems /part/ of it could be that the current page isn't being marked with a "current" class, and so the code goes ahead and loads it again. 

Manmade

unread,
Feb 12, 2012, 4:53:46 PM2/12/12
to phonegap
No Kerri, its not solved, I just tested some code on Hem and Rum
links, but the problem is the same on all the other links.
So if anybody has a solution Ill pay you for it!

Kerri Shotts

unread,
Feb 12, 2012, 6:12:28 PM2/12/12
to phon...@googlegroups.com
Is there any reason you can't use the code that is working on Hem/Rum on the other links? Appears that that code is working -- that is, it loads the content without killing the page. The other links will kill the page if clicked twice.

If you need to use the existing structure, I'll dig through it some more. It appears that, to some degree, it might be the lack of a "current" class being applied to the current page.

Manmade

unread,
Feb 13, 2012, 1:36:07 PM2/13/12
to phonegap
Hi Kerri
Yes the reason that I cant use it because its no animations, and I
really need-want the sliding - fading etc :-)
I have tryed to figure out why its not working but no luck!
I have removed the test on Hem and Rum that I had there.

When you click a link the first time, the loaded page gets the classes
current and slideleft in, and when its loaded it removes the slideleft
in class, but the second time it doesnt remove the slideleft in class!
The current page gets the class current as it is now.

I have tryed to look at my beedesk fork (see above link) where I have
set cachegetrequest to false, and in his it works as it should, but I
cant figure out what he has changed, its so many thing he has changed
in he fork.

So if you would like to have a look at his and comparit to mine, maybe
you will find something :-)
Thanks Kerri!
Reply all
Reply to author
Forward
0 new messages