Sorry, wasn't very clear. The line that was failing was:
        var caption = link.up().previous();
whereas if it's changed to
        var caption = $(link.parentNode.previousSibling);
it always works (exactly same data sets).

I have a sneaky suspicion it may be that when it's failing it's
because IE doesn't consider link to be a Prototype Element, just a
vanilla HTMLElement. Why, I don't know, as it never happens in FF or
Safari.

On 4 Feb, 15:48, kangax <[EMAIL PROTECTED]> wrote:
> Element#previous could return
> undefined if no previous sibling is found.
>
> Try specifying element tag name:
>
> var caption = link.up().previous('caption'), image;
> if (caption) {
>   ...
>
> }
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to