JSFiddle

  • Vanilla DataTable (AJAX Objects)

    Absolute base taken from https://datatables.net/examples/ajax/objects.html

    var jsonData = {
        "data": [{
            "name": "Tiger Nixon",
            "position": "System Architect",
            "salary": "$320,800",
            "start_date": "2011/04/25",
            "office": "Edinburgh",
            "extn": "5421 ...
  • Vanilla DataTable

    Absolute base taken from https://datatables.net/examples/basic_init/zero_configuration.html

    $('#example').DataTable();
    
  • Portsmouth Handicap Calculator

    Sanity Check

            (function($){
                $.fn.getFormData = function(){
                    var data = {};
                    var dataArray = $(this).serializeArray();
                    for(var i=0;i<dataArray.length;i++){
                        data[dataArray ...
  • Simple Canvas Drawing Destructured both ways

    No-Library (pure JS), HTML, CSS, JavaScript

    const rectangles = [];
    (() => {
      const canvas = document.getElementById("canvas");
      const context = canvas.getContext("2d");
      let x, y, width, height;
      const redraw = (callback ...
  • Simple Canvas Drawing Destructured one way

    No-Library (pure JS), HTML, CSS, JavaScript

    const rectangles = [];
    (() => {
      const canvas = document.getElementById("canvas");
      const context = canvas.getContext("2d");
      let x, y, width, height;
      const redraw = (callback ...
  • Simple Canvas Drawing

    No-Library (pure JS), HTML, CSS, JavaScript

    const rectangles = [];
    (() => {
      const canvas = document.getElementById("canvas");
      const context = canvas.getContext("2d");
      let x, y, width, height;
      const redraw = (callback ...
  • First and last

    No-Library (pure JS), HTML, CSS, JavaScript

    const generateCell = (text, active) => {
    	const cell = document.createElement("td");
      cell.textContent = text;
      active && cell.classList.add("active");
      return cell;
    }
    const generateRow = (f, a, b ...
  • Vanilla DataTable with date display from unix

    Absolute base taken from https://datatables.net/examples/basic_init/zero_configuration.html

    $('#example').DataTable({
        "columnDefs": [{
            "targets": 4,
            "render": (data, type) => {
                if (type === "display") {
                    data = moment.unix(~~data).format("MMMM DD, YYYY")
                }
                return ...
  • Vanilla DataTable (AJAX Objects) Search #4 is the latest revision

    Absolute base taken from https://datatables.net/examples/ajax/objects.html

    var jsonData = {
        "data": [{
            "name": "Tiger Nixon",
            "position": ["System Architect", "Accountant", "Junior Technical Author"],
            "salary": "$320,800",
            "start_date": "2011/04/25 ...
  • Vanilla DataTable (AJAX Objects)

    Absolute base taken from https://datatables.net/examples/ajax/objects.html

    var jsonData = {
        "data": [{
            "name": "Tiger Nixon",
            "position": "System Architect",
            "salary": "$320,800",
            "start_date": "2011/04/25",
            "office": "Edinburgh",
            "extn": "5421 ...