Title: Message
Thanks.  I appreciate your response and acknowledge that this question was too off-topic for this forum.
 
Sam
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Justin McCormack
Sent: Tuesday, July 11, 2006 10:49 AM
To: rails-spinoffs@lists.rubyonrails.org
Subject: RE: [Rails-spinoffs] Hiding an event to launch a debug window

I recently wanted to do something similar with showing a debug output DIV. Here's my code:

var BugTool = Class.create();
BugTool.prototype = {
  element: null,
  initialize: function(element, options) {
    this.element = $(element);
    Event.observe(document, "keyup", this.onKeyUp.bindAsEventListener(this), false);
  },

  onKeyUp: function(e) {
    if(ev.ctrlKey && ev.shiftKey && ev.keyCode == 66) { // Ctrl+Shift+B
      Effect.toggle(this.element, "appear");
    }
  }
}

might be of some use


_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to