Skip to content

Instantly share code, notes, and snippets.

@mkdizajn
Created October 2, 2019 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkdizajn/d602e48fdb2dc31bad679544dc02c219 to your computer and use it in GitHub Desktop.
Save mkdizajn/d602e48fdb2dc31bad679544dc02c219 to your computer and use it in GitHub Desktop.
masonry add to existing grid some element (that was hidden) cloned
(function($) {
"use strict";
$(document).ready(function (){
// push custom widgetized calendar widget (hidden inside footer page)
// to masonry layout grid
var elem = $('.calmasonry').clone()
// clone the classes for layout of the box
elem.addClass('isotope-entry col span_1_of_4').removeClass('hidden')
$('#blog-entries').masonry().append( elem ).masonry( 'appended', elem ).masonry()
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment