[jQuery] Re: How to define FireBug?

2008-02-14 Thread spinnach
try if (window.console) { console.log(...); } dennis. mtest wrote: Hello all :) If it possible to define Firebug? Install it or not? Like it possible do whis browsers by command: if ($.browser.safari) { alert(this is safari!); } maybe like this :)) if ($.extensions.firebug) {

[jQuery] Re: How to define FireBug?

2008-02-14 Thread Scott Trudeau
I frequently do something like: if(typeof window.console == 'undefined') window.console = { log: function() {} }; So I can just use console.log() at will since if Firebug (or alternative) is not present, it will just do nothing when called. You can also extend that to do some kind of alternate

[jQuery] Re: How to define FireBug?

2008-02-14 Thread Karl Swedberg
Also, if it's really Firebug that you're after, and not just the console, you could do this: if (window.console console.firebug) { console.log(Firebug is installed); } --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 14, 2008, at