Answer the question
In order to leave comments, you need to log in
How to hang js script on bx-panel in Bitrix?
I want to make it possible to move the bitrix panel id = 'bx-panel' vertically with the mouse. The java script code itself is
var bx_panel = document.getElementById('bx-panel');
bx_panel.onmousedown = function(e) {...//code for dragging bx_panel here} I inserted
it into the js code of the site template script, the problem is that bx_panel is null, i.e. as I understand it, it has not loaded yet, but is already trying to complete. Therefore, the question itself arose, how competently and conceived in Bitrix to hang scripts on the admin panel?
If I insert my js code into the console when the page is fully loaded, it works correctly.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question