JSFiddle

  • Spark demo #48 is the latest revision

    A demonstration of the Spark JavaScript library.

    // You can access Spark via $ notation too, I just prefer writing it in full.
    // Ready
    Spark.ready(function() {
        // Html
        Spark ...
  • SO position example #75 is the latest revision

    Cross browser mouse position within an element

    function findPos(obj) {
        var curleft = curtop = 0;
        
        if (obj.offsetParent) {
            do {
                curleft += obj.offsetLeft;
                curtop += obj.offsetTop;
            } while (obj = obj ...
  • DD Forum post Spark example

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

    // Spark.ajax(method, file, arguments, callback (makes call async));
    Spark.ajax('post', '/echo/html/', 'html=Hello World!', function(data) {
        // Add ...
  • SO height example #194 is the latest revision

    StackOverflow example

    var chil = document.getElementById('chil');
    var chir = document.getElementById('chir');
    
    chir.style.height = (window.getComputedStyle) ?
                        window.getComputedStyle(chil, null).height ...
  • Spark documentation API

    An example of the Spark documentation API

    Spark.jsonp('http://sparkjs.co.uk/documentation/functions', 'finishedDocs');
    
    window.finishedDocs = function(functions) {
        for(var f in functions) {
            Spark('ul ...
  • Spark - Testing

    Testing of the Spark JavaScript library

    Spark.ready(function() {
        Spark.cookie('testCookie', 'isSet');
        alert(Spark.cookie('testCookie'));
    });
  • Spark - Just showing off #8 is the latest revision

    Now that's what I call fancy!

    No code. How about adding some?
  • Spark - Animation function testing

    Testing the Spark animation function

    Spark('div#target').animate({width: 100, height: 100, marginLeft: 30, marginTop: 60});
  • Spark - Animation #42 is the latest revision

    The development environment for the Spark animation function.

    // Get the elements
    var element = document.getElementById('target');
    
    // Run the function
    animate(element, {width: 100, height: 100}, 1000);
    
    // Create the ...
  • Spark - Chaining

    A test of Spark function chaining.

    Spark('p')
        .content('Hey')
        .content(' oh!', true)
        .attribute({title: 'This has been changed'})
        .css({color: '#FF0000'})
        .content(' jsFiddle FTW!', true ...