开发者

JQuery script not working with IE8

I am using this marquee plugin for JQuery: http://www.givainc.com/labs/marquee_jquery_plugin.htm

This creates a streaming ticker out of ul and li elements. I am using imbedded Ruby (Ruby on Rails) to provide the data.

This works on the Mac using Safari and Firefox, and on Windows using Firefox, but does not work with Windows on IE8. I'm having similar problems on another page that is using JQuery. Basically, it is not functional in Internet Explorer 8.

I've researched this but can't seem to find the specific answer I need to make this work. One post I read suggested using $(window).load(function) { instead of $(document).ready(function) {

I appreciate the help. I'm fairly new to JQuery.

Here is the relevant portion of my code:

<script type="text/javascript">
$(document).ready(function (){
  $("#marquee").marquee();
  $("#marquee").marquee("update");
});
</script>


<div id="prayers">
<!-- this loop is necessary to iterate through the array passed in @prayers -->
        <ul id="marquee" class="marquee">
        <% @prayers.each do |prayer| %>

            <li><%= prayer.first_name %> from <%= prayer.city开发者_C百科 %> prays: "<%= prayer.request %>"</li>

        <% end %>

        <li>This is a scrolling prayer. Check it out</li>
        </ul>
</div>


I downloaded the plugin and tested in FF, IE and Chrome and it was working fine for me. One thing I did noticed though is that the plugin would not work if you do not add the css file to your page (jquery.marquee.css).

<link href="Styles/jquery.marquee.css" rel="stylesheet" type="text/css" />

After I added that the plugin worked everywhere. If it does not work for you maybe check IE's Security Tab and make sure you can run Javascript from it.

Good luck.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜