Grow your CSS skills. Land your dream job.

Jquery masonry + history plugin

  • # December 21, 2012 at 8:50 am

    My masonry layout doesn’t hold when using the back button.

    When I click the back button from a permalink, it sends me back to the top of the page.

    I understand this is a problem for jquery.

    What’s a good way to implement a [history plugin](http://www.jquery4u.com/plugins/history-back-button-plugins/ “history plugin”) to my code?

    # December 27, 2012 at 3:44 pm

    It depends on if you’re using infinite scroll. Assuming it’s standard Masonry, with all elements in a page on load, you could easily add/read a cookie that stores their vertical location in the document. You can use HTML5 local storage to keep that value, as well.

    # June 6, 2013 at 4:28 pm

    Wow, how could I go about doing that?

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".