jQuery: Wait/Delay 1 second without executing code
$.delay is used to delay animations in a queue, not halt execution. Instead of using a while loop, you need to recursively call a method that performs the check every second using setTimeout:
$.delay is used to delay animations in a queue, not halt execution. Instead of using a while loop, you need to recursively call a method that performs the check every second using setTimeout: