I have a list of products composed of two columns of inline-block list items. I would like the user to be able to click these items and have them expand to display more information, but it is not rendering as i would like.
I am using simple class toggles to increase the width of items :
$(document).ready(function () {
$('#products').on('click', 'li', function () {
$(this).toggleClass("open")
});
});
Expanding an item on the left fills the space and bumps the whole lot down as i would like. But expanding an item in the right column brings that item down and leaves a gap.
Here is the whole thing:
Is there a better way to build this list to have items cascade naturally when they change size?