Sha256: aceae47f4e5d630312452b8c0b7bbc457efe3533188e83811b7659260356647c

Contents?: true

Size: 1.09 KB

Versions: 11

Compression:

Stored size: 1.09 KB

Contents

var dripload = {
// once started, this will start populating the gallery one image at a time.
    left: true,
    // this will load one image at a time, 
    generateImage: function() {

        article = $('.gallery article')[0]
        data = article.dataset;

        image = new Image();
        image.onload = function(a) {
            if(this.left) {
                append = $('#col-a')
                this.left = false;
            } else {
                append = $('#col-b')
                this.left = true;
            }
            
            pricecallout = '<b>'+data.title+'</b>';

            if(data.price) {
                pricecallout += ' &#160;&#160;&#160; Trina sells these directly!  &#160;&#160 <a href=\''+data.url+'\'>Buy now for $'+data.price+'</a>';
             }


            $(image).appendTo(
                $('<a href="'+data.href+'" title="'+pricecallout+'"></a>')
            ).closest('a').appendTo(append);

            this.generateImage();

        }.bind(this);
        image.src = data.thumbnail;
        article.remove();
    }
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
jekyll-theme-artsy-0.1.12 assets/js/dripload.js
jekyll-theme-artsy-0.1.11 assets/js/dripload.js
jekyll-theme-artsy-0.1.9 assets/js/dripload.js
jekyll-theme-artsy-0.1.8 assets/js/dripload.js
jekyll-theme-artsy-0.1.7 assets/js/dripload.js
jekyll-theme-artsy-0.1.6 assets/js/dripload.js
jekyll-theme-artsy-0.1.5 assets/js/dripload.js
jekyll-theme-artsy-0.1.4 assets/js/dripload.js
jekyll-theme-artsy-0.1.3 assets/js/dripload.js
jekyll-theme-artsy-0.1.2 js/dripload.js
jekyll-theme-artsy-0.1.1 js/dripload.js