Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

jQuery window.load firing too early!

  • 1 trả lời
  • 5 gặp vấn đề này
  • 2 lượt xem
  • Trả lời mới nhất được viết bởi cor-el

more options

I have been working on this problem for days and I just can't find a resolution. I have a slider that hold several Google Charts. The Google Charts need to load prior to the slider loading. The issue is that there is a display:none in the CSS that will throw off the Google Charts. I removed the display:none that was causing the problem and adding a simple jQuery script to add the display:none back in once the DOM is loaded...

<script type="text/javascript"> $(window).load(function () {

       $('.ls-layer').css("display","none");

}); </script>

This works with Chrome and IE, but not Firefox. I've tried many different options and I still can't find a fix for this. It appears that the window.load is just firing off too darn early in FF. Any help would be greatly appreciated!!! Below is a link to one of the pages I'm working on that has this issue...

http://www.burlington-weather.com/current_weather_conditions.php?cityzip=05404

Thanks in advance.

I have been working on this problem for days and I just can't find a resolution. I have a slider that hold several Google Charts. The Google Charts need to load prior to the slider loading. The issue is that there is a display:none in the CSS that will throw off the Google Charts. I removed the display:none that was causing the problem and adding a simple jQuery script to add the display:none back in once the DOM is loaded... <script type="text/javascript"> $(window).load(function () { $('.ls-layer').css("display","none"); }); </script> This works with Chrome and IE, but not Firefox. I've tried many different options and I still can't find a fix for this. It appears that the window.load is just firing off too darn early in FF. Any help would be greatly appreciated!!! Below is a link to one of the pages I'm working on that has this issue... http://www.burlington-weather.com/current_weather_conditions.php?cityzip=05404 Thanks in advance.

Tất cả các câu trả lời (1)

more options

A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.