John Knepper
unread,Mar 7, 2012, 2:27:31 PM3/7/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prototype & script.aculo.us
Hi, here's my javascript code defined in my header:
function destroy(idVal) {
var parNode = document.getElementById(idVal);
var childNode = document.getElementById(idVal +
"div");
parNode.removeChild(childNode);
}
function display(idVal, someText) {
var liNode = document.getElementById(idVal);
var expandEle = document.createElement('div');
expandEle.setAttribute('id', idVal + 'div');
expandEle.setAttribute('style', "-moz-border-radius:
20px; color: white; border-radius: 20px; background-color: #CDC0B0;
width: 90px; height: 100px; margin-left: 10px; padding-left: 15px;
margin-top: 10px; padding-top: 10px;");
expandEle.appendChild(txt);
var txt = document.createTextNode(someText);
expandEle.appendChild(txt);
liNode.appendChild(expandEle);
}
Essentially, I'm trying to do a:
new Effect.SlideDown(expandEle, {duration: 3});
, But to no avail. What is a way to add this fx to my display()
routine in order to have it show up onmousehover? Thanks!