Currently browsing JavaScript

jQuery Logo
Ciprian on Friday, January 12, 2018 — 257 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 — 339 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 — 893 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 — 8,841 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 — 287 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 — 510 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