jQuery datatable add input to toolbar section — December 17, 2017

jQuery datatable add input to toolbar section

//This example will add a button in datatable toolbar. You can add any html element. You can find code here.

Advertisements
jquery Datatable table.columns is not a function —
javascript Get query string parameters — December 11, 2017

javascript Get query string parameters

Now there is super easy way to do this.

// Assuming "?post=1234&action=edit"
    var urlParams = new URLSearchParams(window.location.search);
    console.log(urlParams.has('post')); // true or false
    console.log(urlParams.get('post')); // get the value of key (post)
    //if u have more than one query parameters with same key
    console.log(urlParams.getAll('action')); // ["edit"]
    console.log(urlParams.toString()); // "?post=1234&action=edit"
    urlParams.append('active', '1'); //append new key and value to query string

for more help read this article

javascript get current page Url with or without query string — December 5, 2017
jQuery remove empty element from an array — December 4, 2017
javascript check if variable is an array — November 20, 2017
javascript convert any date to more readable form —