Currently browsing JavaScript

jQuery Logo
Ciprian on Friday, January 12, 2018 — 126 Views

Self Documenting Flexible Parameters

Changing the number of JavaScript function parameters can be unproductive because of the need to update other code calling that function [...]

JavaScript Logo
Ciprian on Thursday, January 11, 2018 — 143 Views

Use ‘this’ Keyword with setTimeout()

setTimeout() is a great help to many JavaScript developers. For example, you may wish to add a delay to allow some animation to complete. [...]

JavaScript Logo
Ciprian on Thursday, January 11, 2018 — 511 Views

Load a JavaScript File On The Fly

Load a JavaScript file on demand and execute dependent functions. function loadFile() { // Create a script tag, set its source [...]

JavaScript Logo
Ciprian on Wednesday, January 10, 2018 — 6,813 Views

Generate HTML List From JavaScript Array

Generate an HTML list based on the contents of a JavaScript array. By modifying the makeList() function to accept parameters and target [...]

JavaScript Logo
Ciprian on Tuesday, January 9, 2018 — 152 Views

Same-Origin AJAX Request Using Vanilla JavaScript

This JavaScript function will send an AJAX request – GET or POST – with no third-party dependencies: function soQuery(soMethod, [...]

JavaScript Logo
Ciprian on Monday, January 8, 2018 — 271 Views

How to Add a CSS Stylesheet in Vanilla JavaScript

The function below will dynamically inject a CSS stylesheet in the document head using vanilla JavaScript (no dependencies): function [...]

Privacy Policy