DOMAssistant 2.7.2 released - triggerEvent and replace added

Published on Monday, September 22nd, 2008

Version 2.7.2 of DOMAssistant has just been released, and beside from some small improvements and minor tweaks, it has two new and very interesting methods.

New methods

The two new methods are:

triggerEvent(evt, target)

The triggerEvent method allows you to trigger an event on an element, like this:

$("news").triggerEvent("click");

$("home-link").triggerEvent("mouseover", elementRef);

Very handy! Also, as pointed out in the release blog post, the event doesn’t actually occur, but the event handler is called within the proper context.

replace(content, returnNew)

The replace method allows you to replace an existing element with a new one. The new element can be specified either through an element, string or number reference. For example:

$("container").replace("<div><em>Way</em> cooler content!</div>");

$("container").replace(elementRef, true);

If the second parameter in the method call is set to true, it returns the new element; otherwise, the replace element is returned.

Downloading DOMAssistant 2.7.2

So, what are you waiting for? If you want a JavaScript library with the methods you will actually ever find any use for, mixed together with the fastest performance, go download DOMAssistant 2.7.2 now!

Share your thoughts:

HTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> . If you want to display code examples, please remember to write &lt; for < and &gt; for >.

Comment preview

Top results