Got a good code on web to dynamically load JS or CSS file function loadjscssfile(filename, filetype){ if (filetype==”js”){ //if filename is a external JavaScript file var fileref=document.createElement(‘script’) fileref.setAttribute(“type”,”text/javascript”) fileref.setAttribute(“src”, filename) } else if (filetype==”css”){ //if filename is an external CSS file var fileref=document.createElement(“link”) fileref.setAttribute(“rel”, “stylesheet”) fileref.setAttribute(“type”, “text/css”) fileref.setAttribute(“href”, filename) } if (typeof fileref!=”undefined”) document.getElementsByTagName(“head”)[0].appendChild(fileref) } […]

Read More →

To update .bash_profile in macbook follow following steps: 1. Open up the terminal. 2. Type nano .bash_profile 3. Copy paste the content that you want to add 4. Press CTRL+o and then press enter 5. Press CTRL+x to exit 6. Type source .bash_profile to reload it. Now your terminal has been updated with latest .bash_profile

Read More →