senchalabs / jQTouch

Create powerful mobile apps with just HTML, CSS, and Zepto.js (or jQuery).
http://www.jqtouch.com/
MIT License
2.79k stars 592 forks source link

jqTouch and WebOS #35

Closed stringham2 closed 12 years ago

stringham2 commented 13 years ago

in the .css file, this line

body>*{display:none}

breaks any phonegap app on a WebOS device. I solved it by wrapping all my divs in a div id='container', and then instead of using an a tag to link to other parts of the document, I used javascript to show and hide divs. Onload of the body, I hide all but the first div (my home screen)

var hideDivs = function(){ var divs = jQuery('#container').children(); for(i=1; i < divs.length; i++){ //keeps first div shown jQuery('#' + divs[i].id).hide(); } }

Then to link from one page to another, I just create onclick events to change which div is hidden & shown.

var changeDiv =function (fromOld,toNew){ jQuery('#' + fromOld).hide('slow'); jQuery('#' + toNew).show('slow'); }

So far this is the only solution I've been able to get working for WebOS devices.

davidkaneda commented 13 years ago

This should be resolved in the most recent version — where we wrap everything in a div#jqt

stringham2 commented 13 years ago

the line div#jqt > * {display: none} still results in none of the divs showing up with WebOS. I'm guessing div#jqt > .current {display: block } isn't working as it should in WebOS. It works fine if I include div#jqt > #myHomeDiv {display: block} in the css file though.

davidkaneda commented 12 years ago

Yep, needs the part that adds the current class. Interesting that WebOS isn't doing it. Please try with the new Zepto stuff in master and let me know if it's still an issue.