$.get
is a shorthand method of $.ajax
:
Perform an asynchronous HTTP (Ajax) request.
An ajax call is usually async so the main console.log
will be fired before the $.get execution is completed (as you can see in the console order) and in that moment the allowDrag
value is still false
.