Skip to content

Instantly share code, notes, and snippets.

☠️
Always on vacation

mohdhazwan

☠️
Always on vacation
Block or report user

Report or block mohdhazwan

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
@mohdhazwan
mohdhazwan / App.css
Last active Aug 15, 2017
simple Lazy Load written ES6 for React / Create React App
View App.css
img {
opacity: 1;
transition: opacity 0.3s;
}
img[data-src] {
opacity: 0.5;
background: ANYCOLOR;
width: ANYHEIGHT;
height: ANYHEIGHT;
@mohdhazwan
mohdhazwan / widget.js
Created Jul 25, 2017
Embeddable Widget JS Boilerplate
View widget.js
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
var allScripts = document.getElementsByTagName('script');
You can’t perform that action at this time.