I have a few item htmls, each of which contains a single JQM-page.
I also have an index page. It is a multi-JQM-paged html, with each JQM-page as a category listing the items.
index.html item1.html item2.html
+------------------+ +--------+--------+ +--------
|+-------+ | +--|Cat. | Next|->|Cat.
||.cont- | | | +--------+--------+ |--------
||ent |+-------+|<----+ | | |
|+-------+|#cat1 || | | |
| | || |bla bla bla | |bla bla
| |link1+---------->| | |
| |link2 || | | |
| +-------+| +-----------------+ +--------
|+-------++-------+|
||#cat2 ||#cat3 ||
|| || ||
||link4 ||link3 ||
|| || ||
|+-------++-------+|
+------------------+
Currently I can link from index to the item, with smooth ajax loading. However I realized that if I want to link back from item to index#cat1, I need to use data-ajax='false' as index is a multi-page html. (I can't use data-rel='back' because previous page isn't always index.html).
If I use ajax='false', I lose the smooth transition if I switch between list and items often (each switching back to list is a reload).
It would be nice if there is an option for data-rel, so when the link is clicked, first search to see if that index#cat1 is already in the dom. If it is, then just switch to that page. If not, then load the index#cat1 without ajax.
Is this feasible? Or can it already be achieved in current version by some other means?