ic-enhance - The Enhance Attribute

Summary

The ic-enhance attribute tells intercooler to enhance all anchor tags (links) and form tags found below the attribute, causing them to issue AJAX requests rather than their standard behavior.

For anchor tags this means that the href is copied over to ic-src, the ic-push-url attribute is set to true, and the ic-deps attribute is set to ignore so no dependent requests are generated for it.

Only local references will be enhanced. Anchor tags that point to other sites, or that reference fragment ids will not be modified.

For form tags this means that the action is copied over to ic-src, the ic-verb attribute is set to method attribute, and the ic-deps attribute is set to false so no dependent requests are generated for it.

In both cases, intercooler attributes can be overridden or added directly to the element if you so wish.

Syntax

The value of the attribute should be true or false.

Dependencies

ic-enhance has no effect on dependencies.

Example

Below is a live demo of an achor tag that has been enhanced. Note that it is a standard anchor tag, but if you click on it it will issue an AJAX request and update the navigation bar.
      <div ic-enhance="true">
        <h3>Here is an enhanced link</h3>
        <a href="/ic-enhance">A Link</a>
      </div>
      

Here is an enhanced link

A Link