Closed techanon closed 9 years ago
Two things concern me:
First, the returned content. Should the entire page object be returned or do you think it should be filtered? Are there any missing values that should be returned which currently aren't?
Secondly, does the cookie need to be set client-side? I wasn't sure so I added it just in case.
Finally taking some time to get back on track. Merging this one now :)
About time I PR this utility. [Summary] A very basic AJAX script setup that fetches the {{body}} content and related scripts/styles from a page request and injects it into the DOM, replacing existing content, based on the given CSS selector.
NOT recommended for use as a drop-in addition even though it is very simple to add. A proper layout structure should be built around this utility.
[Documentation] Options:
Events (via
$(document).trigger()
):Special Behaviour:
noasync
class ~ If you want to exclude a specific anchor from being binded to by this utitily, add the specialnoasync
class.target="_blank"
).async.load = false;
during theasync_start
event or cancel the DOM injection by settingasync.load = false;
during theasync_pre
event.