fantazer
7/8/2016 - 8:43 AM

SCROL TO ID

SCROL TO ID

//bower i page-scroll-to-id --save-dev
//script(src="bower/page-scroll-to-id/jquery.malihu.PageScroll2id.js")

a(href="#new" rel='m_PageScroll2id') Текст

p#new Сюда придет скрол

//Для меню
-
	var items = [
		{name: "Сеты", id: "#cat-set"},
		{name: "Шашлык", id: "#cat-grill"},
		{name: "Люля-кебаб", id: "#cat-luly"},
		{name: "Шаурма", id: "#cat-shaurma"},
		{name: "Денер", id: "#cat-dener"},
		{name: "Бурум", id: "#cat-burum"},
		{name: "Гирос", id: "#cat-giros"},
		{name: "Напитки", id: "#cat-drink"},
		{name: "Десерты", id: "#cat-cake"},
	];
each item in items
	a(href = item.id rel = 'm_PageScroll2id' ).slide-nav__el #{item.name}
$("a[rel='m_PageScroll2id']").mPageScroll2id({
  offset:200,
  highlightClass:"left-nav-el-active",
  onComplete: function () {
		$('.slide-block').removeClass('slide-block--open');
		$('.head-toggle').removeClass('slide-block-toggle--open');
	}
});