123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- function OpenModal(elementid)
- {
- $('#' + elementid).fadeIn(600);
- $('body').css('top', -(document.documentElement.scrollTop) + 'px')
- $('body').css('position', 'fixed');
- $('body').css('overflow-y', 'scroll');
- }
- function CloseModal(elementid)
- {
- $('#' + elementid).fadeOut(600);
- $('body').css('position', 'static');
- $('body').css('overflow-y', 'auto');
- }
- $(document).click(function (e) {
- const isModal = $(e.target).closest('.modal__body').length;
- if (!isModal) {
- $(".modal").fadeOut(600);
- $('body').css('position', 'static');
- $('body').css('overflow-y', 'auto');
- }
- });
- function WidgetMenuClick(menu, elementid)
- {
-
- if (!$(menu).queue().length) {
- $('#' + elementid).fadeToggle("fast", "linear");
- }
- }
- $(document).click(function (e) {
- const isDropbox = $(e.target).closest('.block__dropbox').length;
- if (!isDropbox) {
- $(".block__dropbox").fadeOut(200);
- }
- });
- function ScrollToSection(elementid)
- {
- const scrollTarget = document.getElementById(elementid)
- const topOffset = 80
- const elementPosition = scrollTarget.getBoundingClientRect().top
- const offsetPosition = elementPosition - topOffset
- window.scrollBy({
- top: offsetPosition,
- behavior: 'smooth',
- })
- }
-
-
|