Skip to content

Instantly share code, notes, and snippets.

@ShuvoHabib
Created May 21, 2018 08:30
Show Gist options
  • Save ShuvoHabib/892a47d7a210349ee659cf620a83cd6e to your computer and use it in GitHub Desktop.
Save ShuvoHabib/892a47d7a210349ee659cf620a83cd6e to your computer and use it in GitHub Desktop.
ALL HTML, CSS and JS in one file
var TestName = {
init: function() {
this.TestNameCss(true);
this.mainJS();
},
TestNameCss: function(applyCss) {
if(applyCss){
var mainCss = '';
var headofdoc = document.getElementsByTagName('head')[0];
var s = document.createElement('style');
s.setAttribute('type', 'text/css');
s.appendChild(document.createTextNode(mainCss));
headofdoc.appendChild(s);
}
},
mainJS:function(){
var noticeSection= '';
}
};
(function pollForjQuery() {
if (window.jQuery !== undefined) {
try {
console.log("Variation 11.07.2017 - v1 : 01");
TestName.init();
} catch (err) {
console.log('TRY ERROR: '+ err);
}
}else {
setTimeout(pollForjQuery, 25);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment