2012-08-06 53 views
1

我想添加一個角落郵票,但是沒有正確顯示,我認爲有一個問題與JS代碼。同位素/砌石角郵票

這是官方的演示Masonry Corner Stamp

這是我將它添加到Website

這是JS File

我嘗試添加以下代碼上的JS代碼的頂部文件,但它仍然不工作..

$.Isotope.prototype._masonryResizeChanged = function() { 
    return true; 
    }; 

    $.Isotope.prototype._masonryReset = function() { 
    // layout-specific props 
    this.masonry = {}; 
    this._getSegments(); 
    var i = this.masonry.cols; 
    this.masonry.colYs = []; 
    while (i--) { 
     this.masonry.colYs.push(0); 
    } 

    if (this.options.masonry.cornerStampSelector) { 
     var $cornerStamp = this.element.find(this.options.masonry.cornerStampSelector), 
      stampWidth = $cornerStamp.outerWidth(true) - (this.element.width() % this.masonry.columnWidth), 
      cornerCols = Math.ceil(stampWidth/this.masonry.columnWidth), 
      cornerStampHeight = $cornerStamp.outerHeight(true); 
     for (i = Math.max(this.masonry.cols - cornerCols, cornerCols); i < this.masonry.cols; i++) { 
     this.masonry.colYs[i] = cornerStampHeight; 
     } 
    } 
    }; 

Screenshot

任何幫助表示讚賞

回答