diff --git a/web/app/themes/la_mine/asset/dist/index.js b/web/app/themes/la_mine/asset/dist/index.js index d520fa8d..834d4405 100644 --- a/web/app/themes/la_mine/asset/dist/index.js +++ b/web/app/themes/la_mine/asset/dist/index.js @@ -57,16 +57,19 @@ hamburgers.addEventListener("click", function() { nav.classList.toggle("is-active"); }); -var elem = document.querySelector('.grid'); -if (elem != null) { -var iso = new Isotope( elem, { - itemSelector: '.item', - layoutMode: 'fitRows' -}); -var filtersElem = document.querySelector('.filter-button-group'); -filtersElem.addEventListener( 'click', function( event ) { - var filterValue = event.target.getAttribute('data-filter'); - iso.arrange({ filter: filterValue }); -}); +function isotope() { + + var $grid = $('.grid').isotope({ + itemSelector: '.item' + }); + + $('.filter-button-group li').on( 'click', function(evt) { + var filterValue = $(this).attr('data-filter'); + $grid.isotope({ filter: filterValue }); + }); } + +$( document ).ready(function() { + isotope(); +}); diff --git a/web/app/themes/la_mine/asset/dist/js/isotope.pkgd.min.js b/web/app/themes/la_mine/asset/dist/js/isotope.pkgd.min.js index 7ca671cb..4d6c129c 100644 --- a/web/app/themes/la_mine/asset/dist/js/isotope.pkgd.min.js +++ b/web/app/themes/la_mine/asset/dist/js/isotope.pkgd.min.js @@ -9,4 +9,4 @@ */ !function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n