/* global bindMagnificPopup: true */ /* $(document).ready(function () { function debugMessage(message) { // console.log(message); } class State { constructor() { const localHistoryDataSet = sessionStorage.getItem(this.getLocalHistoryKey()); const view = $('#fld_view').val(); this.container = $('#' + view + '-product-container'); if (localHistoryDataSet) { debugMessage('load state'); this.container.html(localHistoryDataSet); $(window).trigger('scroll'); bindMagnificPopup() } setTimeout(function () { $(window).trigger('scroll'); }, 100); } getLocalHistoryKey() { return 'product-set-' + window.location.href; } store() { debugMessage('stored state'); sessionStorage.setItem(this.getLocalHistoryKey(), this.container.html()); } } const state = new State(); $(window).on('state:change', function () { state.store(); }); }); */