Let me know if the title of this query is unclear. The below code excerpt instead makes the clicked image disappear.
I have reviewed code that toggles an element's height between a set number of pixels. I have reviewed Desandro's masonry toggle code. And I have reviewed the jquery documentation. Nonetheless I'm struggling to realise a solution.
I appreciate that this may be simple to experts but for a novice some direction would be appreciated.
i_stack
$grid.on('click', '.grid-item', function() {
$(this).toggle(
function() {
$(this).height($(this).height() + 100);
},
function() {
$(this).height($(this).height() - 100);
}
);
});