Skip to content

Instantly share code, notes, and snippets.

@AlekVolsk
Created February 10, 2019 09:11
Show Gist options
  • Save AlekVolsk/dfb93f87a63d30304d5c192d852f31c0 to your computer and use it in GitHub Desktop.
Save AlekVolsk/dfb93f87a63d30304d5c192d852f31c0 to your computer and use it in GitHub Desktop.
Установить фильтр uikit2 dinamic grid при переходе на страницу с привязкой в url?
jQuery(document).ready(function($)
{
var loc = window.location.hash.replace('#', '');
history.pushState('', document.title, window.location.pathname);
if (loc != '' && $(loc) && $('.tm-grid-filtering')) {
$('.tm-grid-filtering').attr('data-uk-grid', $('.gridClass').data('uk-grid').replace('}', ', filter:\'' + loc + '\'}'));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment