views:

313

answers:

1

Basically I create a page with a jQuery scroller on it. However in IE7 specifically, on refresh all the li's on the page are shown full out then they hide and the scroller begins.

Anyone know how I can fire the jquery first, or prevent this from happening.

Heres the code

<script language="JavaScript" src="/site/js/jquery-1.3.2.js"></script>
<script language="JavaScript" src="/site/js/jcarousellite_1.0.1c4.js"></script>
<script type="text/javascript">  
 $(document).ready(function() {
 $(".air_ticker").jCarouselLite({vertical: true,visible: 1,auto:10000,speed:1800});
  });  
</script>
A: 

Standard way: like this question

In your HTML:

<body>
  <script type="text/javascript">
    document.body.className += " js";
  </script>

In your CSS (loaded before the .air_ticker element appears in the HTML)

.js .air_ticker { display: none; }

Now, if the browser has JS, the .air_ticker element will be hidden before it has a chance to show.

orip
Doing this keeps the elements entirely hidden. On refresh in IE I just dont want the li's shown for that second. I don't want to hide them permanently
Bry4n
ahh i figured it out. thanks orip!
Bry4n