Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 0.84 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to stop browser loading an image or disconnect to a host?
  2. jQuery(window).bind("load", function() {
  3.     jQuery('#fbProfilePicture').attr("src","http://graph.facebook.com/100001225080368/picture");
  4.     setTimeout(function(){              
  5.           //my code
  6.           if (true)
  7.           {
  8.             //how to disconnect to facebook here.
  9.           }
  10.           else
  11.           {
  12.             //do something
  13.           }
  14.     },5000);
  15. });
  16.        
  17. jQuery(window).bind("load", function() {
  18.     var loaded = false;
  19.     jQuery('#fbProfilePicture').load(function() {
  20.         loaded = true;
  21.     });
  22.  
  23.     jQuery('#fbProfilePicture').attr("src", "http://graph.facebook.com/100001225080368/picture");
  24.  
  25.     setTimeout(function() {
  26.         //my code
  27.         if (loaded) {
  28.  
  29.         } else {
  30.             $('#fbProfilePicture').attr('src', '');
  31.         }
  32.     }, 5000);
  33. });