Take a look at the code Apple used on the Aperture page


It uses Effect.SlideDown and works very well. 

the JS file is here: 


Effect.SlideUpAndDown = function(element) {
element = $(element);
if (Element.visible(element)) { 
new Effect.SlideUp(element, { duration: 0.25 });
var oImg = document.getElementById(element.id+'-img');
oImg.src = ''+element.id+'_normal.gif';
} else { 
new Effect.SlideDown(element, { duration: 0.25 });
}
}

Effect.CheckState = function(element) {
element = $(element);
if(Element.visible(element)) {
new Effect.SlideUp(element, { duration: 0.25 });
var oImg = document.getElementById(element.id+'-img');
oImg.src = ''+element.id+'_normal.gif';
}
}


______________________________________________________________________

Alex Duffield . Principal . InControl Solutions . http://www.incontrolsolutions.com 




On 10-Jul-06, at 9:27 AM, Eskil Kvalnes wrote:

Hello,

I'm hoping this is the right place to ask these kind of questions. If not, please excuse me. Anyway, the problem I'm having is that I have a HTML table
showing some tabular data and I want to use Effect.SlideDown /Up to allow the user to interactively show "details" for each item (<tr><td> etc) in that list.

I'll do some pseudo-code for easier reading:

<table>
 <tr>
  <td>headline</td><td>summary</td>
 </tr>

 <tr>
  <td><a >problems</a></td><td>having problems with script.aculo.us</td>
 </tr>

this is where I'm facing difficulties. I want another table row to appear "onclick", like this:

 <tr id="info-container">
  <td colspan="2">full story here <a >hide me</a></td>
 </tr>

</table>

but I don't want it to be visible at all except for when the user actually clicks "problems". I've tried various solutions, but to no avail.
Perhaps a pair of fresh eyes could shed some light on the situation?
--

Mvh,
Eskil Kvalnes
[EMAIL PROTECTED]
_______________________________________________
Rails-spinoffs mailing list

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

Reply via email to