English 中文(简体)
3. 与IE和jQuery书写的交叉浏览器
原标题:Cross browser Issue with IE and jQuery script

I m 几乎没有交叉浏览器问题。 我的法典似乎无法在伊埃开展工作。 如果任何人都能发现错误,我非常赞赏:

$(document).ready(function() {
    var timerId = 0;
    $( #timerwrap ).ready(function() {
        $( #timerwrap ).html("Please wait <strong id= show-time >5</strong>");
        console.log(timerId)
        if (timerId == 0) {
            timerId = window.setInterval(function() {
                var timeCounter = $("#show-time").html();
                var updateTime = parseInt(timeCounter, 10) - 1;
                $("#show-time").html(updateTime);
                if (updateTime <= 0) {
                    clearTimeout(timerId);
                    $( #timerwrap ).html("<a href= http://2ga.in/push/<?php echo("$item[seo]"); ?>/  target= _parent  title= Continue to <?php echo("$item[title]"); ?> >Continue to...</a>");
                }
            }, 1000);
        }
    });
});​
问题回答
I am not sure for solutions without full requirement or preview, but i found that it s showing an error because of using "" twice in "" so try with edited as below.

<script type="text/javascript">
// Only create tooltips when document is ready
$(document).ready(function() {
    var timerId = 0;
    $( #timerwrap ).ready(function() {
        $( #timerwrap ).html("Please wait <strong id= show-time >5</strong>");
        console.log(timerId)
        if (timerId == 0) {
            timerId = window.setInterval(function() {
                var timeCounter = $("#show-time").html();
                var updateTime = parseInt(timeCounter, 10) - 1;
                $("#show-time").html(updateTime);
                if (updateTime <= 0) {
                    clearTimeout(timerId);
                    $( #timerwrap ).html("<a href= http://2ga.in/push/<?php echo( $item[seo] ); ?>/  target= _parent  title= Continue to <?php echo( $item[title] ); ?> >Continue to...</a>");
                }
            }, 1000);
        }
    });
});
</script> 




相关问题
Image rendered with wrong colors in IE8

I have a gradient image as a PNG (no transparency) in a web-page. By taking a screenshot of Chrome showing the page and cropping the image from the page, I see the exact same colors are drawn as the ...

Determine Mobile Internet Explorer version

I need to determine the version of Mobile Internet Explorer on a Windows Mobile 6.1 device. So that I can report the same user-agent string as is being used by Mobile Internet Explorer. The user-...

CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

Internet Explorer only part loading JavaScript/CSS

I m having trouble with my local development environment where IE (6 through to 8) is only part loading JavaScript/CSS files. It throws random errors at random places in jquery.min.js every time I ...

IE doesn t run Javascript when you click back button

I ve built a shop with tons of JS running. One of the pieces of the cart, is a zip code field which is required to calculate shipping cost. This works fine going through the cart. Now clicking ...

热门标签