Skip to content

Instantly share code, notes, and snippets.

View VasiliuKr's full-sized avatar

Vasiliy VasiliuKr

View GitHub Profile
@VasiliuKr
VasiliuKr / module.js
Last active October 20, 2016 06:52
JS : module
var myModule = (function () {
var init = function () {
_setUpListeners();
// то, что должно произойти сразу
};
var _setUpListeners = function () {
// прослушка событий...
};
@VasiliuKr
VasiliuKr / index.html
Last active September 12, 2016 17:59
start.html
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>New Project</title>
<link rel="stylesheet" href="css/style.css">
@VasiliuKr
VasiliuKr / index.pug
Last active April 6, 2017 17:24
start.pug
doctype html
html(lang="ru")
head
meta(charset="UTF-8")
meta(http-equiv="X-UA-Compatible" content="IE=edge")
meta(name="viewport" content="width=device-width, initial-scale=1")
title New Project
link(rel="stylesheet" href="css/style.css")
// HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries
// WARNING: Respond.js doesn't work if you view the page via file://
@VasiliuKr
VasiliuKr / bitrix_smart_filter_ajax.js
Last active October 26, 2022 07:17
catalog.smart.filter - ajax обновление списка без AXAJ_MODE
// В шаблоне bitrix:catalog.smart.filter редактируем script.js - ищим функцию JCSmartFilter.prototype.postHandler и редактируем следующее
//if (modef.style.display === 'none')
//{
// modef.style.display = 'inline-block';
//}
$.get(
result.FILTER_AJAX_URL,
function (data) {
@VasiliuKr
VasiliuKr / numbers_slider.js
Last active October 12, 2022 09:47
bitrix smart filter numbers slider
// В файле script.js шаблона фильтра редактируем:
SmartFilter.prototype.recountMinPrice = function()
{
/* Блок кода взят с https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round */
var myNamespace = {};
myNamespace.round = function(number, precision) {
var factor = Math.pow(10, precision);
var tempNumber = number * factor;