JSFiddle

  • Dragging #23 is the latest revision

    Dragging with jQuery UI and Native JavaScript.

    //jQuery, fast, but not I wanted. Won't be able to be draggable
    //outside the window.
    $("div#jquery").draggable();
    
    
    //Native ...
  • guyzyl.org #5 is the latest revision

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

    function slide(ele,i) {
        ele.innerHTML="";
        var img = document.createElement("img");
        img.src="//guyzyl.org/files/"+i+".jpg";
        ele.appendChild ...
  • HTML5 file type #10 is the latest revision

    HTML5 file type

    function handleFileSelect(evt) {
        var files = evt.target.files;     // file list
        for (var i = 0, f; f = files[i]; i++) {
            if ...
  • Comment remover #57 is the latest revision

    jQuery 1.7.2, HTML, CSS, JavaScript

    $("button").click(function(){
        $("textarea").val($("textarea").val().replace(/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->)(.|\n))*-->/g,""));
        
    });
  • SVG circle #147 is the latest revision

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

    <svg>
        <circle cx="40" cy="40" r="24"/>
    </svg>
  • HTML5 Siri #69 is the latest revision

    HTML5 Siri. Only Google Chrome supports it.

    var vars = {
        "txt": $("input").attr("value"),
        "known": false,
        "regexp": {
            "say": /^say (.+)$/i,
            "ask": /^ask me if I am (.+)$/i,
            "time ...
  • HTML5 pushState

    HTML5 pushState demo

    function ps(url) {
        history.pushState({}, "", url);
    }
    
    ps("/test.html");
    
    $(window).bind("popstate", function() {
        $("div#output").append("popstate<br>");
    })
    
    $("a").click(function ...
  • Custom font #31 is the latest revision

    jQuery 1.7.1, HTML, CSS, JavaScript

    WebFontConfig = {
        google: {
            families: ['Glass+Antiqua::latin']
            //You can set more fonts here.
        }
    };
    var YOURFUNCTION = function() {
        var wf = document.createElement('script ...
  • sin and cos

    sin and cos

    window.requestAnimFrame = (function(){
          return  window.requestAnimationFrame       || 
                  window.webkitRequestAnimationFrame || 
                  window.mozRequestAnimationFrame    || 
                  window.oRequestAnimationFrame      || 
                  window.msRequestAnimationFrame     || 
                  function(/* function */ callback, /* DOMElement */ element){
                    window ...