Fixed XenForo.Loader not working, Comment describes it as ContentLoader


Well-known member
Described as @param jQuery a.ContentLoader[href][data-target], although the search for "ContentLoader" is not giving back any results for xenforo files.

    * Allows a link or input to load content via AJAX and insert it into the DOM.
    * The control element to which this is applied must have href or data-href attributes
    * and a data-target attribute describing a jQuery selector for the element relative to which
    * the content will be inserted.
    * You may optionally provide a data-method attribute to override the default insertion method
    * of 'appendTo'.
    * By default, the control will be unlinked and have its click event unbound after a single use.
    * Specify data-unlink="false" to prevent this default behaviour.
    * Upon successful return of AJAX data, the control element will fire a 'ContentLoaded' event,
    * including ajaxData and textStatus data properties.
    * After template content has been inserted, the control element will fire a 'ContentInserted' event
    * after which the control will be deactivated.
    * @param jQuery a.ContentLoader[href][data-target]
   XenForo.Loader = function($link)


XenForo developer
Staff member
That's just an outdated comment, so it's been cleaned up.

For reference, my tests (using adapted code from what you've provided) worked fine. You may want to return data wrapped in an HTML container.


Well-known member
If I change the template to "<html>Hello World</html>" it works great. Thank you so much !

This is a very powerful function by the way which is not used by any programmer yet, at least a search for it doesn't return any results.