JSFiddle

  • CSS Variables in JavaScript #46 is the latest revision

    Demo to show how JS and CSS can interact in the future

    /*
        "Abusing" CSS Variables for (arbitrary) configuration in CSS. 
        Allowing "separation of concerns"-workarounds for multiple problems.
        E.g. listing supposedly ...
  • jQuery.contextMenu - wrapping submenu item in IE9 #3 is the latest revision

    jQuery 1.7.2, HTML, CSS, JavaScript

    $(function(){
        $.contextMenu({
            selector: '.context-menu-one', 
            callback: function(key, options) {
                var m = "clicked: " + key;
                window.console && console.log(m) || alert(m); 
            },
            items: {
                "edit": {name: "Edit", icon: "edit ...
  • Internet Explorer 9 - Table Border Bug #68 is the latest revision

    ... how to kill IE9

    document.getElementById('kill').onclick = function() {
        document.getElementById('problematic').style.display = 'none';
    }
  • Sandbox.js #2 is the latest revision

    Early draft for a sandbox (basically an iframe) API primarily to run tests independent of the currently loaded scripts and dom

    (function(undefined){
    var slice = Array.prototype.slice;
    var Sandbox = function(options) {
        if (!(this instanceof Sandbox)) {
            return new Sandbox(options);
        }
        
        if ...
  • Filling a Table Diagonally #2 is the latest revision

    Answer to http://stackoverflow.com/questions/11168760/use-jquery-to-dynamically-number-table-columns-diagonally

    // see http://stackoverflow.com/questions/11168760/use-jquery-to-dynamically-number-table-columns-diagonally
    
    var $table = $('table'),
        $rows = $table.find('tr'),
        _rows = $rows.length,
        _cols = $rows.first ...
  • Native ContextMenu On Demand #7 is the latest revision

    jQuery 1.7.2, HTML, CSS, JavaScript

    $(function(){
    
        $('#trigger').get(0).addEventListener('mousedown', function(e) {
            console.log("mousedown");
            
            // firefox wants the attribute set, property is not enough ...
  • jQuery.contextMenu - Title Demo #1087 is the latest revision

    https://github.com/medialize/jQuery-contextMenu/issues/50#issuecomment-6060439

    $(function(){
        $.contextMenu({
            selector: '.context-menu-one', 
            callback: function(key, options) {
                var m = "clicked: " + key;
                window.console && console.log(m) || alert(m); 
            },
            items: {
                "edit": {name: "Edit", icon: "edit ...
  • SubPixel Font Rendering Test

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

    /*
     * Test for sub-pixel font rendering support
     * Authors: @derSchepp, @gerritvanaaken, @rodneyrehm
     */
    (function(window, document){
        function testSubpixelFontRendering() {
            var container = document.createElement('div ...
  • Sorting Numbers within Strings #28 is the latest revision

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

    var s = 'hello 1 world|hello -2 world|hello 2 world record|hello 10 world|hello 11.34 world|hello ...
  • Javascript Loose Comparison Table #20 is the latest revision

    jQuery 1.7.2, HTML, CSS, JavaScript

    (function($, undefined){
        
    // watch out for chrome sorting numeric keys
    // prepending space for that
    var values = {
        "true": true,
        "false": false,
        "null ...