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