HIRDETÉS
HIRDETÉS
HIRDETÉS'); jQuery('#grid-stack-item-4').append('
HIRDETÉS
'); jQuery('#grid-stack-item-5').append('
HIRDETÉS
'); jQuery('#grid-stack-item-6').append('
HIRDETÉS
'); initGrid(false); }); } else { initGrid(true); } var dragEnabledInit = true; function initGrid(dragEnabledInitParam) { dragEnabledInit = dragEnabledInitParam; var grid = new Muuri('.muuri-grid', { /*dragStartPredicate: { distance: 1, delay: 200 },*/ /*dragContainer:'news-block-header',*/ dragEnabled: dragEnabledInit, enableDrag: dragEnabledInit, layoutOnInit: false, dragStartPredicate: { handle: '.news-block-header' }, }).on('move', function () { saveLayout(grid); }); var layout = window.localStorage.getItem('layout'); if (layout) { loadLayout(grid, layout); } else { grid.layout(true); } if (dragEnabledInit == false) { grid.getItems().forEach(item => { if (!item._drag) return; item._drag.destroy(); item._drag = null; }); } } function serializeLayout(grid) { var itemIds = grid.getItems().map(function (item) { return item.getElement().getAttribute('data-id'); }); return JSON.stringify(itemIds); } function saveLayout(grid) { var layout = serializeLayout(grid); window.localStorage.setItem('layout', layout); } function loadLayout(grid, serializedLayout) { var layout = JSON.parse(serializedLayout); var currentItems = grid.getItems(); var currentItemIds = currentItems.map(function (item) { return item.getElement().getAttribute('data-id') }); var newItems = []; var itemId; var itemIndex; for (var i = 0; i < layout.length; i++) { itemId = layout[i]; itemIndex = currentItemIds.indexOf(itemId); if (itemIndex > -1) { newItems.push(currentItems[itemIndex]) } } grid.sort(newItems, {layout: 'instant'}); } function redirect_to_link_touch_devices(redirect_link) { if (dragEnabledInit == true) { //window.location.href = redirect_link; } if (screen.width > 576) { window.location.href = redirect_link; } }
Felhasználási feltételek | Adatvédelem | Süti tájékoztató | Süti beállítások

Keresés folyamatban a következőre: ' + search_query + ', kis türelmet...'); $.ajax({ type: "POST", url: "index.php", cache: false, data: {ajax_instant_search_query: search_query}, success: function (html) { $('#ajax-instant-search-result-container').html(html); } }); } else { $('#ajax-instant-search-result').hide(); } console.log($('#instant-search-query').val()); }