Take one list item containing an anchor - possibly cloned from a hidden list you made earlier.
Add this list item to another list and call .listview('refresh') on the list to update the layout.
The layout of the list item breaks - the padding increases.
The same thing can be simulated by calling .listview('refresh', true) on a list that already contains a list item with an anchor.
The class ui-li-static is being added to both list item and its inner div. If this class should be there for the layout it should probably have been added when the list was first enhanced.
Attached is a working demo of this effect.
Please I hope I am wrong and this is a my misunderstanding - if so I would welcome some advice.
Either way a work around would be good.
Many thanks for Jquery Mobile - which is generally brilliant.
---- update -----
So it only occurs if you call viewlist('refresh') on an item that has already been enhanced and contains a <a /> tag. i.e. you have copied it from another list or you are calling viewlist('refresh', true) and so doing a whole list.
My work around is to stop using hidden template chunks of html and instead to generate the html in code and call viewlist('refresh') so it only effects the new (non-enhanced) stuff from code. An alternative would be to mark these templates as not to be enhanced in the first pass but I understand there is a performance hit for that.
I still think this is an issue that might need looking at.
jQuery Mobile is the fourth mobile library I have tried and I love it compared to all that has gone before - so thanks to all for their hard work.
I'm looking for options to host our site/app and am considering using a .mobi domain as our institution domain is a little long and complex but the .mobi T&C contains this:
"I am aware that content on .mobi domains has to comply with the Switch On! Guides. Domains with content that does not comply with the Switch On! Guides shall be placed into a hold status which will prevent their resolution on the internet."
The Switch On! Guides basically say you have to deliver XHTML Mobile Profile. After googling around to find an answer I presume that HTML5 does not fit that profile.
We still have to make the decision on the domain but if we want to go with .mobi then I presume I can do some content negotiation and just deliver a holding page for clients that have an accepted header of only XHTML-MP and therefore meet the terms of the hosting meanwhile returning an HTML5 jQuery Mobile site to everyone else.
Does anyone here deliver jQuery Mobile based sites on a .mobi domain? Is it an accepted practice?
Your thoughts/advice would be most gratefully received.