JSFiddle

  • Array Plus Delay

    jQuery (edge), HTML, CSS, JavaScript, Firebug Lite

    function ArrayPlusDelay1(array, delegate, delay) {
    
      // initialize all calls right away
      array.forEach(function (el, i) {
        setTimeout(function() {
            // each loop, call ...
  • jQuery Validate - Wrap Validation Error

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

    $(function () {
      var valSettings = $("form").data("validator").settings
    	valSettings.highlight = wrap($.validator.defaults.highlight, highlightDecorator)
      valSettings.unhighlight = wrap($.validator.defaults.unhighlight ...
  • Wild Card Logo

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

    // http://www.teacherschoice.com.au/Maths_Library/Trigonometry/solve_trig_SAS.htm
    // https://stackoverflow.com/a/12830454/1366033
    // https://css-tricks.com/transforms-on-svg-elements/
    // http ...
  • Converting string to date in js #1 is the latest revision

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

    function stringToDate(dateAsString, format, delimiter) {
      var formatLowerCase = format.toLowerCase();
      var formatItems = formatLowerCase.split(delimiter);
    
      var dateItems = dateAsString.split(delimiter);
    
      var ...
  • String To Date

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

    function stringToDate(dateAsString, format, delimiter) {
      var formatLowerCase = format.toLowerCase();
      var formatItems = formatLowerCase.split(delimiter);
    
      var dateItems = dateAsString.split(delimiter);
    
      var ...
  • SVG - Run Icon #2 is the latest revision

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

    <!-- Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Clipping_and_masking -->
    <img src="http://i.imgur.com/qsfnk0a.png" alt="">
    
    <svg version="1.1" 
        xmlns="http://www.w3.org/2000/svg"
        xmlns:xlink="http://www.w3.org/1999/xlink"
        width="200" height="200">
        <defs>
        <style type="text/css"><![CDATA[
           svg line,
           svg polyline {
              stroke: black;
              fill: none;
              stroke-width: 15;
              stroke-linecap: round;
              stroke-linejoin: round;
            }
        ]]></style>
      </defs>
      
      <line x1="109" y1="45" x2="100" y2="108" id="torso" />
      
      <polyline points="109 45 71 60 76 91" id="right-arm"/>
      <polyline points="109 45 150 38 141 70" id="left-arm"/>
      <polyline points="100 108 79 152 45 168" id="right-leg"/>
      <polyline points="100 108 141 146 138 178" id="left-leg"/>
    
      <circle cx="115" cy="19" r="15" fill="black" id="face" />
      <circle cx="144" cy="58" r="8" fill="red" id="watch" />
            
    </svg>
    
  • Boxing an Array

    jQuery (edge), HTML, CSS, JavaScript, Firebug Lite

    var arrayOfStrings = [
      "https://jsfiddle.net/",
      "https://www.google.com/",
      "http://stackoverflow.com/"
    ];
    var arrayToJSON = JSON.stringify(arrayOfStrings)
    var JSONToArray = JSON ...
  • Garmin Color Palette

    jQuery 2.2.4, HTML, CSS, JavaScript

    var colors16 = [
      {r: 255, g: 255, b: 255, hex: '#FFFFFF', name: 'WHITE'},
      {r: 170, g: 170, b: 170, hex: '#AAAAAA ...
  • DataTables.js Add/Replace Row #7 is the latest revision

    jQuery 1.9.1, HTML, CSS, JavaScript

    $(function() {
    	  // initialize table
        var $dt = $('#example').DataTable({
            paging:   false,
            bFilter: false, 
            bInfo: false
        });
        
     		// add row
        $('#addRow').click(function () {
            //$dt.row ...
  • Debug Breakpoint Interrupts Event

    jQuery 2.2.4, HTML, CSS, JavaScript

    $("#NameA").blur(function(e){
    	console.log(this.id + ' ' + e.type + 'ed');
    });
    $("#SubmitA").click(function(e){
    	console.log(this.id + ' ' + e ...