Last active
July 2, 2019 07:10
-
-
Save ArtemSites/da4b5d9959844d6fe17aeb9bc23e1752 to your computer and use it in GitHub Desktop.
Bitrix - редирект по повторному нажатию на кнопку.
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() { | |
$('.services__header-item-btn').click(function() { | |
$(this).addClass('go-to-the-service'); | |
$('.go-to-the-service').click(function() { | |
var link = $(this).attr('link'); | |
window.location.href = link; | |
}); | |
}); | |
}); |
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
<?foreach ($arResult['SECTIONS'] as &$arSection):?> | |
<li class="services__header-item js-service-header-item"> | |
<button link="<?=$arSection['~SECTION_PAGE_URL']?>"><?=$arSection['NAME']?></button> | |
</li> | |
<?//print('<pre style="display:none;">'); print_r($arSection);print('</pre>');?> | |
<?endforeach;?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment