$(function () {
var siteheadHeight;
var menublockHeight;
$(window).load(function () {
siteheadHeight = $(".site-head").height();
menublockHeight = $(".menu-block").height();
});
$(window).scroll(function () {
if ($(window).scrollTop() > siteheadHeight) {
$(".site-head").css('height', siteheadHeight + menublockHeight);
$(".menu-block").addClass("stick");
} else {
$(".site-head").css('height', siteheadHeight);
$(".menu-block").removeClass("stick");
}
});
$('.products-view-item').on("click", function (event) {
event.stopPropagation();
var target = $(event.target);
if (target.closest(".compare-control").length > 0 || target.closest(".products-view-buy").length > 0 || target.closest(".products-view-photos-image").length > 0) {
return;
}
if ($(this).data('hreff')) window.location = $(this).data('hreff');
});
});
.products-view-tile-home .col-xs:last-child{
display:none;
}
<?php
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
/**
* @global CMain $APPLICATION
*/
global $APPLICATION;
//delayed function must return a string
if(empty($arResult))
return "";
$strReturn = '';
//we can't use $APPLICATION->SetAdditionalCSS() here because we are inside the buffered function GetNavChain()
$css = $APPLICATION->GetCSSArray();
if(!is_array($css) || !in_array("/bitrix/css/main/font-awesome.css", $css))
{
$strReturn .= '<link href="'.CUtil::GetAdditionalFileURL("/bitrix/css/main/font-awesome.css").'" type="text/css" rel="stylesheet" />'."\n";
}
$strReturn .= '<div class="bx-breadcrumb">';
$itemSize = count($arResult);
for($index = 0; $index < $itemSize; $index++)
{
$title = htmlspecialcharsex($arResult[$index]["TITLE"]);
$nextRef = ($index < $itemSize-2 && $arResult[$index+1]["LINK"] <> ""? ' itemref="bx_breadcrumb_'.($index+1).'"' : '');
$child = ($index > 0? ' itemprop="child"' : '');
$arrow = ($index > 0? '<i class="fa fa-angle-right"></i>' : '');
if($arResult[$index]["LINK"] <> "" && $index != $itemSize-1)
{
}
else if(empty($arResult[2]))
{
$strReturn .= '
<ul class="crumbs">
<li><a href="/index.php">Главная</a></li style="padding: 0 10px 0 3px;"><li style="padding: 0 10px 0 3px;"><a href="/catalog/">Каталог</a></li style="padding: 0 10px 0 3px;"><li style="padding: 0 10px 0 3px;"><a href="/catalog/new/">Вилочные погрузчики</a></li>
<li style="padding: 0 10px 0 3px;"><a href="'.$arResult[1]["LINK"].'">'.$arResult[1]["TITLE"].'</a></li>
</ul>';
} else
{
$strReturn .= '
<ul class="crumbs">
<li><a href="/index.php">Главная</a></li style="padding: 0 10px 0 3px;"><li style="padding: 0 10px 0 3px;"><a href="/catalog/">Каталог</a></li style="padding: 0 10px 0 3px;"><li style="padding: 0 10px 0 3px;"><a href="/catalog/new/">Вилочные погрузчики</a>
<ul class="sub-menu">'?>
<?$APPLICATION->IncludeComponent(
"bitrix:catalog.section.list",
"4k2_section_breadcrumb",
array(
"ADD_SECTIONS_CHAIN" => "Y",
"CACHE_GROUPS" => "Y",
"CACHE_TIME" => "36000000",
"CACHE_TYPE" => "A",
"COUNT_ELEMENTS" => "N",
"IBLOCK_ID" => "17",
"IBLOCK_TYPE" => "4k2_catalog",
"SECTION_CODE" => "",
"SECTION_FIELDS" => array(
0 => "NAME",
1 => "",
),
"SECTION_ID" => $_REQUEST["SECTION_ID"],
"SECTION_URL" => "#SITE_DIR#/catalog/new/#SECTION_ID#/",
"SECTION_USER_FIELDS" => array(
0 => "",
1 => "",
),
"SHOW_PARENT_NAME" => "Y",
"TOP_DEPTH" => "1",
"VIEW_MODE" => "LINE",
"COMPONENT_TEMPLATE" => ".default"
),
false
);?>
<?'</ul>
</li>
<li style="padding: 0 10px 0 3px;"><a href="'.$arResult[1]["LINK"].'">'.$arResult[1]["TITLE"].'</a></li>
<li style="padding: 0 10px 0 3px;"><a href="'.$arResult[2]["LINK"].'">'.$arResult[2]["TITLE"].'</a></li>
</ul>';
}
}
$strReturn .= '<div style="clear:both"></div></div>';
return $strReturn;
<div class="modal fade" id="modalRegister" tabindex="-1" role="dialog" aria-labelledby="modalAnswer">
<div class="modal-dialog modal-dialog__bordered" role="document">
<div class="modal-content modal-content">
<div class="modal-body">
<button type="button" class="modal-close" data-dismiss="modal" aria-label="Закрыть"><span aria-hidden="true">×</span></button>
<form class="form jq-register-form" method="post" action="?send=Y">
<h3 class="form_heading heading">Регистрация</h3>
<div class="form_row">
<label class="form_label">Категория:</label>
<select class="field" name="category">
<option>Клиника</option>
<option value="2">Частный врач</option>
</select>
</div>
<div class="jq-content">
<div class="form_row">
<input class="field" type="text" placeholder="Название клиники" name="name" required>
</div>
<div class="form_row">
<textarea class="field field__textarea" placeholder="Описание" name="description"></textarea>
</div>
<div class="form_row">
<input class="field" type="email" placeholder="Электронная почта" name="email" required>
</div>
<div class="form_row">
<input class="field" placeholder="Регион:" type="text" name="region">
</div>
<div class="form_row">
<div id="reCaptcha1"></div>
</div>
</div>
<button class="main-btn" type="submit" name="register_submit" value="Y"><span class="icon icon-forum"></span> Отправить</button>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$('.jq-register-form').on('change', '[name="category"]', function(){
if ($(this).val() == 2) {
$('.jq-register-form .jq-content').html(
'<div class="form_row">'+
'<label class="form_label">Ф.И.О.: <span style="color: red;">*</span></label>' +
'<input class="field" type="text" name="name" required>' +
'</div>' +
'<div class="form_row">'+
'<label class="form_label">Профессия: <span style="color: red;">*</span></label>' +
'<input class="field" type="text" name="job" required>' +
'</div>' +
'<div class="form_row">' +
'<label class="form_label">Опыт: <span style="color: red;">*</span></label>' +
'<textarea class="field field__textarea" name="exp" require></textarea>' +
'</div>' +
'<div class="form_row">' +
'<label class="form_label">Специализация: <span style="color: red;">*</span></label>' +
'<textarea class="field field__textarea" name="spec" require></textarea>' +
'</div>' +
'<div class="form_row">' +
'<label class="form_label">Адрес клиники: <span style="color: red;">*</span></label>' +
'<textarea class="field field__textarea" name="address" require></textarea>' +
'</div>' +
'<div class="form_row">' +
'<label class="form_label">Ваш e-mail: <span style="color: red;">*</span></label>' +
'<input class="field" type="email" name="email" required>' +
'</div>' +
'<div class="form_row">'+
'<label class="form_label">Телефон (для связи администрации сайта с врачом, не публикуется на сайте): </label>' +
'<input class="field" type="text" name="phone">' +
'</div>' +
'<div class="form_row">' +
'<label class="form_label">Регион:</label>' +
'<input class="field" type="text" name="region">' +
'</div>' +
'<div class="form_row">' +
'<label class="form_label">Дополнительная информация: </label>' +
'<textarea class="field field__textarea" name="opt"></textarea>' +
'</div>'
);
}
else {
$('.jq-register-form .jq-content').html(
'<div class="form_row">'+
'<label class="form_label">Название: <span style="color: red;">*</span></label>' +
'<input class="field" type="text" name="name" required>' +
'</div>' +
'<div class="form_row">' +
'<label class="form_label">Описание: <span style="color: red;">*</span></label>' +
'<textarea class="field field__textarea" name="description"></textarea>' +
'</div>' +
'<div class="form_row">' +
'<label class="form_label">Ваш e-mail: <span style="color: red;">*</span></label>' +
'<input class="field" type="email" name="email" required>' +
'</div>' +
'<div class="form_row">' +
'<label class="form_label">Регион:</label>' +
'<input class="field" type="text" name="region">' +
'</div>'
);
}
});
</script>