开发者

Have to change tabs in order to HTML appear properly

I have used jCarousel to create what? A carousel. Then, the boss wanted me to create some selectors so that the user could select different lists of the results (as if it were the same carousel, but showing different results).

The strategy I used was simple: I created multiple carousels and hide them. Only the selected carousel will appear.

It works fine except for one thing: In Firefox (and now in IE8) I am forced to change to another tab of the browser and then get back or change the window size if I want to to see it the it should.

Of course, this is not the kind of thing that a user guesses or even tolerates.

EDIT

Here's what I am trying to achieve:

Have to change tabs in order to HTML appear properly

Have to change tabs in order to HTML appear properly

Here's what is wrong:

Have to change tabs in order to HTML appear properly

This is the appearance of the list when it is first loaded and before the window is re-sized or I select some other tab in the browser

When I change tabs in the browser or change the size of the window, it starts working correctly.

I believe that if I call and an handler for an event (like resize window, tabchanged or something like that). What do you think?

More data

: I am not sure if this will be relevant to the case, but I am using jCarousel. The element that an incorrect width is the corresponding开发者_运维知识库 unordered list that contains the elements that you see in the images above.


what if you try a page refresh and tie


This code solved the problem:

<script type="text/javascript">
    $(window).resize();
</script>

Hope this helps someone in a far far far way future.


Apologies the answer submitted before I could finish. I meant to say tie a page refresh to the script such as top.location.href - not sure of the jquery equivalent.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜