ic-on-success - JQuery AJAX Request life cycle attribute

Summary

This attribute is a javascript expression that will be evaluated after a successful AJAX request is completed on behalf of Intercooler. It corresponds to the success property in JQuery's ajax() method.

Syntax

This attribute is a valid javascript expression, evaluated within an isolated scope.

This attribute may be placed on parent elements, allowing you to specify behavior across multiple elements.

Available symbols are:

  • data - The data to be send to the server
  • textStatus - The AJAX textStatus
  • xhr - The XHR object

Returning false from this expression will halt Intercooler's normal request processing and prevent content swapping.

The ic-on-success can be placed on an parent element, allowing general request processing for an entire page. Intercooler will find the closest element with this attribute and evaluate it.