Skip to content

Instantly share code, notes, and snippets.

Filipe Torres filipe-torres

Block or report user

Report or block filipe-torres

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lazamar
lazamar / loadPageSection.js
Last active Feb 2, 2019
Vanilla JS implementation of JQuery's .load
View loadPageSection.js
/**
* Loads an HTML document from a URL and retuns an element selected using
* the 'selector' parameter
* Example usage:
* loadPageSection('./myPage.html', '#container', (r, err) => console.log(r, err));
*
* @method loadPageSection
* @param {String} url
* @param {String} selector - A valid CSS selector
* @param {Function} callback - To be called with two parameters (response, error)
You can’t perform that action at this time.