This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let pushState = history.pushState; | |
| let self = this; | |
| history.pushState = function () { | |
| pushState.apply(history, arguments); | |
| self.fireEvents('pushState', arguments); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var event = new Event('build'); | |
| elem.addEventListener('build', function (e) { ... }, false); | |
| elem.dispatchEvent(event); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const xmlHttp = new XMLHttpRequest(); | |
| xmlHttp.onreadystatechange = () => { | |
| if (xmlHttp.readyState === XMLHttpRequest.DONE) { | |
| const response = xmlHttp.responseText; | |
| this.loadReport(reportName, response); | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| JADE: | |
| section.accordeon__wrapper | |
| ul.accordeon | |
| li.accordeon__item | |
| a.accordeon__trigger(href="#{js}") accordeon item 1 | |
| ul.accordeon__inner | |
| li.accordeon__inner__item: a.accordeon__inner__link(href="#{js}") accordeon inner link 1 | |
| li.accordeon__inner__item: a.accordeon__inner__link(href="#{js}") accordeon inner link 2 | |
| li.accordeon__inner__item: a.accordeon__inner__link(href="#{js}") accordeon inner link 3 | |
| li.accordeon__item |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //кнопка наверх | |
| $(window).scroll(function() { | |
| if ($(this).scrollTop() > $(this).height()) { | |
| $('.top').addClass('active'); | |
| } else { | |
| $('.top').removeClass('active'); | |
| } | |
| }); | |
| $('.top').click(function() { | |
| $('html, body').stop().animate({scrollTop: 0}, 'slow', 'swing'); |