views:

552

answers:

4

I want to make a mini timeline with jquery and this timeline have width more than 32767 px. When I change it by jquery $(".timelinecontainer").width(32767); in Opera does not change it, but in others browsers it works. What can you give me advices ?

Sorry for my English :)

+4  A: 

I suspect that Opera keeps the window width as a short and thus is not able to handle values larger than 32767. You should probably change your approach anyway and scale the timeline to fit the current window, then give the ability to zoom in on portions of it. I think your interface will look and work better this way. The way you seem to be doing it, the user will have to do a lot of scrolling to view the timeline and won't ever be able to see it in its entirety.

tvanfosson
+3  A: 

I'm sure I'll get flamed for saying this but--you could just ignore Opera.

If you like how things look in the other browsers (IE,FF,Safari/Chrome), then I'd say you've got 99% of your bases covered.

You may want to file a bug against Opera, of course. (though I guess it could be jquery--it may have a different code path for Opera). If you could make a simple HTML page to reproduce the problem, you'd know. Then, attach it to the bug report.

Michael Haren
It's hard to see how it could be jQuery. Javascript doesn't have different int sizes and I don't know why they would make a check for the width in Opera just for the sake of making it different. You could actually look at the jQuery code, though, and see.
tvanfosson
I agree with you, I'm just trying to be fair to all possibly guilty parties. This should be easy to confirm with a simple Html page, maybe with a little JS, if necessary.
Michael Haren
Since JS can't create a "short" or "long" only an int or a number I can't see how jQuery would be at fault. Opera likely has the bug, but then I don't think they expected a (32 x screen width) element to be a common occurrence either. ;-)
scunliffe
A: 

This is definitely a bug with Opera.

Coincidentally, I was seeing it for the first time just yesterday. In my situation I have an inner container with width:9999em and an outer container that uses overflow:hidden and scrollLeft() to create a carousel. In Opera the scrollLeft() stops responding at that width.

File a bug with Opera: https://bugs.opera.com/wizard/

Borgar
A: 

Sounds like an Opera bug to me, too.

Why not take a look at Simile's Timeline project (http://simile.mit.edu/timeline/) and see how they've done it?

nickf