Hi all,
I have some code that looks like this:
if(!Control.LightHouse.CONTROL) {
Control.LightHouse.CONTROL = {};
// check for DOM node with colorpicker
if (!$("colorpicker")) {
// build the node here.
var control = Builder.node('div', {id:
'lightHouse'});
// add some structure to the control
control.innerHTML =
'<div id="lightHouseBody">' + '<img
id="gradient" src="' +
this.options.IMAGE_BASE + 'gradient.jpg" alt="">' +
'</div>';
// append child to DOM
document.body.appendChild(control);
}
}
// capture current instance of the lighthouse
this.control = Control.LightHouse.CONTROL;
Event.observe(this.swatch, "click", this.toggle);
},
toggle : function(event) {
console.log("event: " + event);
this.isOpen = true;
Element.show('lightHouse');
Event.stop(event);
console.log("Swatch has been clicked.");
}
my CSS for lightHouse is this:
#lightHouse
{
display: none;
position: absolute;
border-top-width: 4px;
border-right-width: 4px;
border-bottom-width: 4px;
border-left-width: 4px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #e8f6ff;
border-right-color: #e8f6ff;
border-bottom-color: #e8f6ff;
border-left-color: #e8f6ff;
background-color: #e8f6ff;
padding-top: 4px;
padding-right: 4px;
padding-bottom: 4px;
padding-left: 4px;
}
Any idea why when I trigger the event, it won't show?
thanks,
- sf
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---