New jquery-amend repo

Stef Walter stefw at redhat.com
Wed Jan 7 16:30:55 UTC 2015


As we discussed on Monday, I added the jquery-amend plugin to its own
repo here:

https://github.com/cockpit-project/jquery-amend

This is a jQuery plugin that smoothly amends a DOM with possibly updated
HTML, rather than just replace it outright.

Instead of:

$('#my-el').html(html_string);

You do:

$('#my-id').amend(html_string);

This solves some minimal annoyances such not unnecessarily blowing away
user interaction state, such as highlighting links, open drop downs, or
scroll position.

Marius did some more work to optionally use key based correlation.
That's not in here yet. But it makes sense to include it once it's ready.

Stef


More information about the cockpit-devel mailing list