JSFiddle

  • Highcharts Base #2 is the latest revision

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

    $(function () {
        var options = ;
        $('#container').highcharts(options);
    });
  • Drops per second

    jQuery Compat (edge), HTML, CSS, JavaScript

    $(function() {
        $('input[type="button"]').click(function() {
           var weight = +$('#weight').val(),
               maintenanceRate = +$('#maintenanceRate').val(),
               dropsPerMl = +$('#dropsPerMl').val();
    
            var mlPerSecond = (weight * (maintenanceRate ...
  • Zipf's Song

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

    var Song = function(playCount, name) {
        this.playCount = playCount;
        this.name = name;
        this.quality = 0;
    }
    
    var playList = [
        new Song(197812, 're_hash ...
  • Show/hide without JS

    jQuery 2.0, HTML, CSS, JavaScript

    $(function() {
        $('input').click(function() {
            $('li').eq(2).toggleClass('collapsed');
        });
    });
  • SO. Number validation

    http://stackoverflow.com/questions/15679564/javascript-for-loop-round-form-input-fields

    $(function() {
        $('input[type="button"]').click(function() {
            if ($('input.number').filter(function() { return isNaN(this.value); }).length) {
                 alert('Please ensure all ...
  • Tri-state checkboxes

    jQuery 1.9.1, HTML, CSS, JavaScript

    $(function() {
       $('input').eq(1).prop('indeterminate', true); 
    });
  • Invoicing

    jQuery 1.9.1, HTML, CSS, JavaScript

    $(document).ready(function() {
        $("#dropdown2").select2({
            minimumResultsForSearch: 10     
        });
    });
  • Popup ease-in

    jQuery 1.9.1, HTML, CSS, JavaScript

    $(function() {
        $('input').click(function() {
            $('div').toggleClass('show colour');
        });
    });
  • Deal or no deal names

    jQuery 1.8.3, HTML, CSS, JavaScript

    var body = $('body').css({
        fontSize: document.body.scrollHeight * 0.3,
        paddingTop: document.body.scrollHeight * 0.35
    }).click(function() {
        var names ...
  • Deal or no deal

    jQuery 1.8.3, HTML, CSS, JavaScript

    var boxes = {
        blue: ['1p', '2p', '5p', '10p', '20p', '50p', '99p'],
        red: ['£1', '£2', '£4', '£7', '£10', '£15', '£20']
    };
    
    var maxHeight ...