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

Untitled

By: a guest on Apr 30th, 2012  |  syntax: None  |  size: 0.29 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. Using socket.io inside my namespace
  2. (function() {
  3.   // All Standard SocketIO code
  4.  
  5. }).call(MyLibrary);
  6.        
  7. MyLibrary.$ = MyLibrary.jQuery = jQuery.noConflict(true);
  8.        
  9. MyLibrary.io = window.io; // Assign it to your desired namespace
  10. delete window.io; // Remove it from the window namespace