Checking a website is accessible JQuery / Javascript -


i trying use javascript, ping website, , display result this.

i have set jsfiddle, no luck far. - https://jsfiddle.net/yyjowtru/

i feel close, seems if change following code (the url), nothing seem's change.

    // check if can see site $.ping("http://www.google.com").done(function (success, url, time, on) {     // insert menu item linking sign-in page     $("#menu-main-menu").append('<li><a target="_blank" href="#">sign in</a></li>');     // change width of li accommodate menu item     $(".navbar li").css("width", "14.2857%"); }); 

can see obvious?

thanks in advance

edit screenshot of jsfiddle enter image description here

well forgot load jquery in fiddle. load , should work. try fiddle

frameworks & extensions > choose jquery version want load

https://jsfiddle.net/yyjowtru/1/


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -