I'm making an app with XDK, so I need to show a connection failure message. I want to check that with a button that when I click on it check the connection and if it's online goes to a webpage, otherwise goes to another with the failure connection message.
Is there any solution, method or function with javaScript or jQuery for do this status check?