This file contains 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.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; |
This file contains 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
// В шаблоне 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) { |
This file contains 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
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:// |
This file contains 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
<!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"> | |
This file contains 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 myModule = (function () { | |
var init = function () { | |
_setUpListeners(); | |
// то, что должно произойти сразу | |
}; | |
var _setUpListeners = function () { | |
// прослушка событий... | |
}; |