--- layout: default nav: attributes > all ---

Intercooler.JS Attribute Reference

Attribute Description
ic-src This attribute allows you to bind an element to a given URL. Once it is bound, when a change occurs that Intercooler recognizes as affecting the URL (or given an event such as a poll), Intercooler will issue a GET to the URL and replace the element with the new content, if it is different.
ic-style-src Like ic-src, this attribute allows you bind to a URL. However, this attribute binds a style attribute to a URL. The syntax is "style-attribute:url". For example, to bind the color of an element to "/color/random", you would say ic-style-src="color:/color/random"
ic-attr-src Like ic-style-src, this attribute allows you bind to a URL. However, this attribute binds an attribute value to a URL. The syntax is "attribute:url". For example, to bind the style of an element to "/style/random", you would say ic-attr-src="style:/style/random"
ic-prepend-from When triggered this attribute will issue a GET and prepend all content returned to the children of the element it is on.
ic-append-from When triggered this attribute will issue a GET and append all content returned to the children of the element it is on.
ic-limit-children Limits the number of children that an element is allowed to have after an ic-prepend-from or ic-append-from fires.
ic-get-from This attribute allows you to bind the "action" of an element to a given URL. Once it is bound, when an "action" occurs (e.g. clicking a button) Intercooler will issue a GET to the URL and replace the element with the new content, if it is different. Intercooler will detect any other elements that the GET effects and automatically refresh them.
ic-post-to This attribute allows you to bind the "action" of an element to a given URL. Once it is bound, when an "action" occurs (e.g. clicking a button) Intercooler will issue a POST to the URL and replace the element with the new content, if it is different. Intercooler will detect any other elements that the POST effects and automatically refresh them.
ic-put-to This attribute allows you to bind the "action" of an element to a given URL. Once it is bound, when an "action" occurs (e.g. clicking a button) Intercooler will issue a PUT to the URL and replace the element with the new content, if it is different. Intercooler will detect any other elements that the PUT effects and automatically refresh them.
ic-delete-from This attribute allows you to bind the "action" of an element to a given URL. Once it is bound, when an "action" occurs (e.g. clicking a button) Intercooler will issue a DELETE to the URL and replace the element with the new content, if it is different. Intercooler will detect any other elements that the DELETE effects and automatically refresh them.
ic-confirm This attribute can be used to confirm an action with a user before proceeding.
ic-target This attribute is often used with an action attribute (e.g. ic-post-to) in order to target the content of another element for replacement.
ic-replace-target If this attribute is set to "true", the target element of the intercooler request will be replaced entirely with the server response, rather than replacing the inner HTML of the element. This is useful in cases where you cannot wrap an element around a potential target easily, like table rows.
ic-include A selector attribute that can be used to include additional input with an action request (e.g. can be used to include a form with an unrelated button.)
ic-transition Controls the transition used when replacing an element.
ic-indicator This attribute can be used to show a progress indicator while an Intercooler AJAX request is in flight.
ic-poll This attribute tells Intercooler to poll the source URL for the element it is on in a given interval, expressed as milliseconds or seconds. (e.g. '500ms' or '2s')
ic-poll-repeats This attribute limit the number of polling calls (e.g. '5')
ic-trigger-on This attributes changes the event on which the element is loaded via ic-src. It can be used to implement lazy loading of images or charts, infinite scrolling, etc.
ic-trigger-delay This attributes delays the execution of a trigger and, if the trigger occurs again within the given interval, cancels the original trigger in favor of the new one, which will begin waiting for the interval again.
ic-success-on This attributes allows the execution of js code via ic-success-on content after the execution of the action request.
ic-deps This attribute allows you to express additional path dependencies for a given element, beyond the implied ones.
ic-verb This attribute allows you to override the HTTP verb to use in a request.
ic-always-update By setting this value to "false", intercooler will not update an element if the server responds with the same content that the element already has.
ic-on-beforeSend This attribute allows a script to be evaluated during the beforeSend stage of AJAX requests made on behalf of Intercooler.
ic-on-success This attribute allows a script to be evaluated after successful AJAX requests made on behalf of Intercooler.
ic-on-error This attribute allows a script to be evaluated after unsuccessful AJAX requests made on behalf of Intercooler.
ic-on-complete This attribute allows a script to be evaluated after any AJAX requests made on behalf of Intercooler.
ic-push-url This attribute tells Intercooler to update the current location with the target URL of the element after a successful AJAX request, with history support.
ic-select-from-response This attribute tells Intercooler to filter the servers response to content matching the given CSS selector. This can be useful for making a full HTML response act like a partial responses.
ic-remove-after This attribute tells Intercooler to remove the element it is on after the given amount of time has elapsed.