|Official Website:||Go to website|
Connection Status is a small jQuery plugin that uses an AJAX request to determine whether the client machine is connected. With this plugin, you can use
setinterval to send an ajax request at specified intervals and then do stuff based on the status. In the demo page, we'll see the input buttons become disabled while you lost internet connection.
2. Call the plugin and you're done.
3. Available settings.
var frequency = 10; //Frequency to check connection in seconds var remotepole = true; // Change to true to send the AJAX request to the address you specify. This is helpful if you dont want to make the request to the clients current page. var remoteaddress = "http://www.yahoo.com"; // Only needed if remotepole is true var errormessage = "Connection to the server has been interupted. Please Try Again."; // This is the message the user will see. var usenativediv = true; //Falsewill call show()/hide() on a div you specify by id. This is a usefel way to use this plugin with your sites existing features. var foreigndivid = "myDIVid"; //Only needed if you dont want to use my div. Make sure you hide it in document ready or it will be there for a few seconds and confuse the client. var inputstodisable = ["button","submit"]; //This will disable input buttons of type submit when connections are not available. var connectionaddress = "";
- Add z-index and update readme