S
S
sportik1742019-08-08 14:11:17
1C-Bitrix
sportik174, 2019-08-08 14:11:17

Why is the script connected at the end of the Bitrix page?

Hello! The crux of the matter is this. I insert a piece of JS code into the template at the beginning after the body tag. And as a result, it is displayed on the site at the end. See the screenshots for more details. The script needs to be placed at the beginning.5d4c034b36a5c966717122.png5d4c035344be7762530873.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Larin, 2019-08-08
@sportik174

because in the settings of the main module there is a checkbox - move scripts to the bottom of the page.
If some script does not need to be moved, then you need to wrap it in

<script data-skip-moving=true>
      // Скрипт который НЕ НАДО переносить
</script>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question