I'm building a web app using jQueryMobile (primarily) - exclusively for the iPhone 4s, and I'm having the following issue:
The icons that are included with jQueryMobile are not displaying properly (not displaying in High Resolution) on an iPhone 4s with retina display. All the custom icons I've used do display properly in high resolution format, but the default icons are not loading in high-res.
I've verified that this is not just my imagination, as I can see that the file that is getting loaded is "icons-18-white.png" rather than "icons-36-white.png".
I'm not using media queries as this is device specific, and doesn't need them.
Is there something I'm missing? Or any suggestions.
The listview has two types of <li>'s, and are themed accordingly and have a class set accordingly. Lets call them l-1 and l-2.
When I click on l-1, what should happen is the following:
That listitem toggles a class that gives the appearance that it is selecte similar to $.ui.selectable- and only one selected item is allowed per list. (This is accomplished easily using basic jQuery.)
An ajax call is made sending particular values (based on which l-1 listitem was clicked) to the server.
A callback function causes certain text on the page to be highlighted green for the success callback and highlight red on an error or fail callback (this is done using $.then(fn,fn);
What should happen when I clickl-2, is that the list is replaced by another list that is the next level down on this particular hierarchy. (I don't think that l-2 has anything to do with this particular issue, and include only for clarity)
A little tricky to implement, but nothing that wasn't straightforward once I figured it out. And it works .... sort of.
All that was just background. Here is the issue:
If I go to the page once, select an item and then go through the steps above, everything works as expected. (We're just going to look atl-1 here). I can generate a listview through autocomplete as many times as I like, click an l-1 listitem, the style is applied, the ajax fires successfully, the success/fail element is highlighted, voila!
I'm happy, and pat myself on the back encouragingly.
However, and this is where the real weirdness begins -
Let's say that I leave the page by going back to the home page (not using the back-button, but just a straightforward jQuery Mobile link), and then once there, I click on the link to bring me back to this page, and I'm back to (lets say the page in question is called Page-2). On Page-2 things start off well: I generate the list using autocomplete, but when I click on an l-1 item, the following happens (or doesn't):
The style is not applied to the clicked l-1 listitem.
The ajax request is called, and returns success.
The success element is highlighted.
Strangely the ajax is called twice and returns the same data.
If I leave and come back to Page-2, (this now my third visit) the same thing happens, except:
The style is applied to listitem.
The ajax call is now made three times.
This pattern continues (presumably for awhile - I tried up to 8 times) in the following manner:
On odd #'d trips back, the style is applied, e.g. (the 3rd trip back,5th,7th)
One even #'d trips back, the style is not applied. e.g (4th,6th,8th)
Each trip back, the number of ajax requests made increases by one. See the photos of the network panel on the first trip, and on the 8th trip (this is generated by nothing other than the same mouse click).