JSFiddle

  • image center in div #1 is the latest revision

    image center in div

    <div class='container'>
      <img src='http://www.ryanseacrest.com/wp-content/uploads/2014/07/harry-potter-1.jpg' />
    </div>
    
  • Scroll Magic Parallax #35 is the latest revision

    scrollin

    jQuery(function ($) {
        var controller = new ScrollMagic.Controller();
        var tween = TweenMax.staggerFromTo(".masthead", 2, {
            backgroundPosition: "0 0"
        }, {
            backgroundPosition: "0 150px"
        });
        var ...
  • draggable scroll area pan jquery UI #5 is the latest revision

    jQuery 1.9.1, HTML, CSS, JavaScript, jQuery UI 1.9.2

        jQuery("#map").draggable({
            containment: $('#container')
        });
  • push an element down or up #37 is the latest revision

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

    function fadeElement() {
    
        var element = document.getElementById("element");
    
        // shrink item
        element.className = element.className + " push-down";
    
        // increase height
        //element.className = element.className ...
  • Mithril Hello World #47 is the latest revision

    Mithril Hello World

    //namespace
    var app = {};
    
    //model
    app.PageList = function() {
        var pages = [];
        pages.push({title: 'home', url: '#'});
        pages.push({title: 'about', url: '#'});
        pages ...
  • Mithril Hello World #6 is the latest revision

    Mithril Hello World

    //namespace
    var app = {};
    
    //model
    app.PageList = function() {
        var pages = [];
        pages.push({title: 'page 1', url: '/page1.html'});
        pages.push({title ...
  • Basic Mithril todo #3 is the latest revision

    Basic Mithril todo

    var todo = {};
    
    //for simplicity, we use this module to namespace the model classes
    
    //the Todo class has two properties
    todo ...
  • update textarea result

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

    function myFunction() {
        var textElem = document.getElementById("text3").value;
        var newText = textElem.replace("BROWN", "RED");
        newText = newText.replace("FOX", "RABBIT");
        newText ...
  • autocomplete javascript #242 is the latest revision

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

    var people = ['Steven', 'Sean', 'Stefan', 'Sam', 'Nathan'];
    
    function matchPeople(input) {
      var reg = new RegExp(input.split('').join('\\w*').replace(/\W ...
  • cloud player basic

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

    SC.initialize({
        client_id: '522eef33018b0f73bf8a64f55df40ccc'
    });
    
    var d = document.getElementById("audio-test"); 
    
    SC.get("/tracks/178345187", {}, function(sound){
        d.setAttribute("src", sound.stream_url ...