mixhtml

Inner attributes

The response contains one main tag browser. Inside this tag, many DOM elements can be placed. These elements, if needed, can contain the following attributes.

mix-show

This attribute, in an inner element, doesn't exist. When an element is created, it is shown by default. To create an element, just make a DOM tag. If mix-fade-* is not set, the element will be shown inmediately.

<browser><div>New</div></browser>

<browser><div mix-fade-2000>New</div></browser>

mix-hide

This attribute hides the newly create element. If not mix-fade-* is set, then it will hide it using the default fade time.

<browser><div mix-hide>New</div></browser>

<browser><div mix-hide mix-fade-2000>New</div></browser>

mix-remove

This attribute removes the newly create element. If not mix-fade-* is set, then it will remove it using the default fade time.

<browser><div mix-remove>New</div></browser>

<browser><div mix-remove mix-fade-2000>New</div></browser>

mix-fade-*

This attribute either fades-in or fades-out one or many elements. There are five pre-defined fade times and the time is in milliseconds:

mix-fade-1000

mix-fade-2000

mix-fade-3000

mix-fade-4000

mix-fade-5000

mix-ttl

A ttl (time to live) can be set on an element. This means, that the element will be removed or shown from the DOM under the ttl specified in the ttl. The ttl is in milliseconds. In the following example the div will be removed from the DOM after 2 seconds.

<mixhtml mix-top="#item">
<div mix-ttl="2000">New element</div>
</mixhtml>