Masonry is a Keyword in Javascript?

Is masonry a Keyword in Javascript?
Reference →

// add layout event
var _postLayout = Masonry.prototype._postLayout;
Masonry.prototype._postLayout = function() {
  _postLayout.apply( this, arguments );
  this.emitEvent( 'layout', [ this ] );
};



$( function() {
  var $container = $('#container').masonry({
    isFitWidth: true,
    // disables initial layout
    isInitLayout: false
  });
  var $proxy = $('#proxy');
  // bind on layout
  $container.masonry( 'on', 'layout', function() {
    $proxy.width( $container.width() );
  });
  // init masonry
  $container.masonry();
});

Or i am missing something?

Masonry is the function that works as wrapper.

1 Like

Masonry is a pre built function in Jquery, Right?
But what do you mean when you say it is a wrapper?

That’s correct.It’s pre-built function. In a plain words it wraps the elemenst (divs etc.) and then it work with the way that is described. Remember that it’s not an element object but a function object.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.