Line 1 is working. It removes an event from the view. The problem is
in line 2. I am calling childElements on a div called
'single_blog_info_box_480' (which contains the events). The idea is to
make a message appear when there are no more events left. The thing is
that I currently have 3 events and everytime the RJS is executed it
shows the same 3 events even though events have become hidden. Can
somebody guide me on how to do this or what the problem is?
Line 1 is working. It removes an event from the view. The problem is
in line 2. I am calling childElements on a div called
'single_blog_info_box_480' (which contains the events). The idea is to
make a message appear when there are no more events left. The thing is
that I currently have 3 events and everytime the RJS is executed it
shows the same 3 events even though events have become hidden. Can
somebody guide me on how to do this or what the problem is?
I added the () but that's not the problem. I added the next alert and
it shows the events length. But if I remove another event it still
shows the same number.
The childElements length never changes when I make the event
disappear. It's like it remains with what initially is loaded on the
html eventhough I have hide this elements.
The childElements length never changes when I make the event
disappear. It's like it remains with what initially is loaded on the
html eventhough I have hide this elements.
I don't use these effects a lot, but the fade effect in prototype/
scriptaculous is probably setting the css 'display' property to none
to take it out of the visual display of the document. It's still
sitting there in the dom, so 'childElements' is probably counting it;
it's just that it doesn't appear in the visual flow.