Swapping of any element that has an ID #170
Until recently, it was only possible to swap content divs with the same ID across pages.
(Why? -> That will be more powerful and flexible for the web designer)
The new function _copyAttributes() now works and was a pre-requisite for supporting any kind of element.
Swapping any kind of element can now be established, by performing the following two steps, which augment each other:
This issue is, in turn, a pre-requisite for moving towards supporting any kind of elements with ID across pages, even when they are inconsistent, i.e. not present on all pages of the site...
First tests on this partner site indicate that it might already be working properly...
The div with the ID
... has been enriched with two new elements:
Pages of the testbed have been divided into three different page types:
Additional HTML for the Home page
<img src="https://4nf.org/images/home.gif" id="prodlogo"> <h1 id="prodh1">Home</h1>
Additional HTML for the Product Search page
<img src="https://4nf.org/images/preview_small.jpg" id="prodlogo"> <h1 id="prodh1">Product search</h1>
Additional HTML for all other pages
<img src="https://4nf.org/images/delta_small.png" id="prodlogo"> <h1 id="prodh1">Normal page</h1>
Finally, the main Ajaxify selection was adapted to:
Desired output for the various pages (
...and it works right away!...
What does this test?
Obviously, these are dead-simple test cases, but it is reassuring to see, that they work instantaneously!
The text was updated successfully, but these errors were encountered: