[whatwg] <a onlyreplace>

On Fri, Oct 16, 2009 at 5:08 PM, Markus Ernst <derernst at gmx.ch> wrote:
>> (Also, in your examples you probably want @onlyreplace="content
>> navigation", since your nav is changing from page to page as well.
>
> Indeed. Or, maybe I'd do it slightly differently, somehow like:
>
> <ul id="navigation">
> ?<li><a href="page1.html" onlyreplace="content" class="thisPage"
> ? ?onClick="resetNavigation(this)">Broccoli</a></li>
> ?<li><a href="page2.html" onlyreplace="content"
> ? ?onClick="resetNavigation(this)">Leak</a></li>
> </ul>
>
> The resetNavigation() function then takes the class attribute from the old
> link and adds it to the clicked one. So the navigation can be static, and
> though its appearance remains consistent, whether page2.html is completely
> loaded, or only the parts defined in @onlyreplace.

Yup, that'd work too.

~TJ

Received on Friday, 16 October 2009 15:09:26 UTC