The problem is this: I call the modal window through the colorbox and in this modal window, ready is triggered, which should read the attribute of one element, but the problem is that ready is at the very bottom of the page, and tries to read it when the popup has not loaded yet. Well, it turns out that there is no variable value.

enter image description here

In the alert, there must be an attribute value that is located above the alert itself. I tried to use holdready - it did not help. Can anyone come across ...

And yes. I tried to cling to the colorbox event onComplete - also so far without success ...

I decided:

$(document).bind('cbox_complete', function(){ ///// тут мой код }); 

    0