S
S
Simon Tis2019-10-04 09:58:59
JavaScript
Simon Tis, 2019-10-04 09:58:59

Why doesn't Jquery work in the connected script (1s Bitrix)?

There is a script - the output agent of the form.
Put it in a separate folder.
I'm trying to connect it in the header.php template in different ways using the 1c bitrix documentation.
I tried to connect it as an external js and using Asset::getInstance()->addJs(SITE_TEMPLATE_PATH . "/js/fix.js");
and through $APPLICATION
All the same - the script was connected - but jquery did not work.
If you push the script into the header in the forehead, everything works, but you can’t do this.
Tell me, please, why jquery can not be processed when the script is "correctly" connected using bitrix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex-1917, 2019-10-04
@alex-1917

$APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH.'/js/fix.js');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question