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
| if(document.cookie.match(/debug=([^\;]*)/) != null){ | |
| console.log('debug'); | |
| }; | |
| if(isset($_COOKIE['debug'])){ | |
| $var = 'dfsdfsd'; | |
| echo "<pre style='display: none;' data-fsdfsdsdsdf4444='dfhnksdfl'>"; | |
| var_dump($var); | |
| echo "</pre>"; | |
| } |
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
| function createCookie(name, value, days) { | |
| var expires; | |
| if (days) { | |
| var date = new Date(); | |
| date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); | |
| expires = "; expires=" + date.toGMTString(); | |
| } else { | |
| expires = ""; | |
| } | |
| document.cookie = name + "=" + value + expires + "; path=/"; |
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
| RewriteCond %{HTTP_HOST} ^www\.(.*)$ | |
| RewriteRule ^(.*)$ http://%1/$1 [L,R=301] |
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
| $('.formLine-form input[type="checkbox"]').change(function(event) { | |
| testCheckPolit($(this)); | |
| }); | |
| // Если чекбокс выбран то активируем кнопку отправки если нет деактивируем | |
| function testCheckPolit(el){ | |
| if(el.prop('checked')){ | |
| el.closest('form').find('button, input[type="submit"]').removeAttr('disabled'); | |
| }else { | |
| el.closest('form').find('button, input[type="submit"]').attr('disabled', 'disabled'); |
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
| // Cache selectors | |
| var lastId, | |
| topMenu = $(".fixed-nav"), | |
| topMenuHeight = topMenu.outerHeight() + 15, | |
| // All list items | |
| menuItems = topMenu.find("a"), | |
| // Anchors corresponding to menu items | |
| scrollItems = menuItems.map(function() { | |
| var item = $($(this).attr("href")); | |
| if (item.length) { |
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
| <!-- html --> | |
| <div id="menu"> | |
| <ul> | |
| <li><a href="#1"></a><span>Индивидуальный пошив</span></li> | |
| <li><a href="http://css-live.ru/articles-css/ravnomernoe-vyravnivanie-blokov-po-shirine.html"></a><span>Технология</span></li> | |
| <li><a href="#3"></a><span>Ткани</span> | |
| <ul> | |
| <li><a href="#"></a><span>дроп даун</span></li> | |
| <li><a href="#"></a><span>дроп даун</span></li> | |
| <li><a href="#"></a><span>дроп даун</span></li> |
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
| $(document).ready(function(){ | |
| $("#menu").on("click","a", function (event) { | |
| //отменяем стандартную обработку нажатия по ссылке | |
| event.preventDefault(); | |
| //забираем идентификатор бока с атрибута href | |
| var id = $(this).attr('href'), | |
| //узнаем высоту от начала страницы до блока на который ссылается якорь | |
| top = $(id).offset().top; |
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
| <nav class="nav"> | |
| <ul> | |
| <li>Главная</li> | |
| <li>Услуги</li> | |
| <li>О нас</li> | |
| <li>Контакты</li> | |
| </ul> | |
| </nav> |
NewerOlder