B
B
budro772018-04-12 20:10:37
1C-Bitrix
budro77, 2018-04-12 20:10:37

Bitrix Javascript to the bottom of the page?

When activating the "Move all Javascript to the bottom of the page" option, jQuery falls off.
Connected like this:
CJSCore::Init(array("jquery"));
$APPLICATION->SetAdditionalCSS("/js/lytebox.css",true);
$APPLICATION->SetAdditionalCSS('/js/fancybox/jquery.fancybox.css',true);
$APPLICATION->AddHeadScript("/js/lytebox.js" );
$APPLICATION->AddHeadScript("/js/flexSlider.js" );
$APPLICATION->AddHeadScript("/js/jquery.columnizer.js" );
$APPLICATION->AddHeadScript("/js/inputmask.js" );
$APPLICATION->AddHeadScript("/js/jquery.inputmask.js" );
$APPLICATION->AddHeadScript("/js/inputmask.phone.extensions.js" );
$APPLICATION->AddHeadScript('/js/menu.js');
$APPLICATION->AddHeadScript('/js/addtocart.js')
Tried CJSCore::Init(array("jquery")); put before $APPLICATION->ShowHead(), everything still breaks.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
serginhold, 2018-04-12
@serginhold

Look at the ShowHead sources, you will see that there are 5-8 calls of other functions inside, and here are those that are not js, you write instead of ShowHead, and the js call is also manually below. And do not use these strange options that parse the entire page and move the html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question