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
<script> | |
$(document).ready(function () { | |
/* Плавная прокрутка */ | |
$("#scroll-reviews").click(function () { | |
var elementClick = $(this).attr("href"); | |
var destination = $(elementClick).offset().top; | |
$("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 1500); | |
return false; | |
}); | |
/* Плавная прокрутка END */ |
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
1) Emmet | |
2) Emmet LiveStyle | |
3) SideBar Enhancement | |
4) Themr | |
5) Schemr | |
6) AdvancedNewFile | |
7) AutoFileName | |
8) AngularJS | |
9) EncodingHelper | |
10) BracketHighlighter |
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 man = 0; | |
$(".manufacturers-filter-block .checkbox").each(function (index, elem) { | |
man++; | |
}); | |
if (man <= 8) { | |
$(".pokaz").remove(); | |
}; | |
$(".pokaz>p").on("click", function (mo) { | |
console.log("click"); | |
$(".manufacturers-filter-block").toggleClass("open"); |
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 getRandom = function (min, max) { | |
return Math.random() * (max - min) + min; | |
}; |
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 myFunc = function() { | |
return function(){ | |
console.log("Hi!"); | |
} | |
}; | |
//Вызов | |
myFunc()(); //Выведет в консоль "Hi!" |
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
/************************** CHOOSEN-FILTER-BLOCK *******************************/ | |
var choosen = {}; | |
choosen.listFilters = []; | |
choosen.update = function () { | |
this.listFilters = []; | |
$(".active_filter").each(function (index, elem) { | |
if ($(elem).attr("data-name") != "min_price" | |
&& $(elem).attr("data-name") != "max_price") { |
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
1) Конкатенация: | |
$a = 10; | |
$b = 5; | |
<?php echo $a . $b; ?> | |
Это выражение выведет: "105". | |
2) Экранирование спецсимволов в строках: | |
$brand = "<p style=\"color: red;\"> \"AUDI\" </p>"; |
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
<snippet> | |
<content><![CDATA[ | |
<!-- begin $1 --> | |
<div class="$1"> | |
$2 | |
</div> | |
<!-- end $1 --> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>di</tabTrigger> |
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 getWatchers(root) { | |
root = angular.element(root || document.documentElement); | |
var watcherCount = 0; | |
function getElemWatchers(element) { | |
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope); | |
var scopeWatchers = getWatchersFromScope(element.data().$scope); | |
var watchers = scopeWatchers.concat(isolateWatchers); | |
angular.forEach(element.children(), function (childElement) { | |
watchers = watchers.concat(getElemWatchers(angular.element(childElement))); |
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
.element { | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
transform: translateX(-50%); | |
transform: translateY(-50%); | |
} |