Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/264.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php IE和Safari上的jQuery倒计时插件中断_Php_Jquery_Internet Explorer_Safari_Countdown - Fatal编程技术网

Php IE和Safari上的jQuery倒计时插件中断

Php IE和Safari上的jQuery倒计时插件中断,php,jquery,internet-explorer,safari,countdown,Php,Jquery,Internet Explorer,Safari,Countdown,我在一个页面上使用多个实例 <div class="TimeLeft"> <?php echo counterDate($dl['end'][0]); //YYYY, MM, DD ?> </div> <div class="TimeLeft"> <?php echo counterDate($dl['end'][1]); //YYYY, MM, DD ?> </div> 等等 我的jquery代码使用

我在一个页面上使用多个实例

<div class="TimeLeft">
    <?php echo counterDate($dl['end'][0]); //YYYY, MM, DD ?>
</div>
<div class="TimeLeft">
    <?php echo counterDate($dl['end'][1]); //YYYY, MM, DD ?>
</div>

等等

我的jquery代码使用每个函数

$(".TimeLeft").each(function() {
        $(this).countdown({until:  new Date($(this).text()) , format: 'HMS', compact: true, 
    layout: '<span class="offerTimeStart">&nbsp;</span><span class="offerTimeContent">{hnn}</span><span class="offerTimeSep">&nbsp;</span><span class="offerTimeContent">{mnn}</span><span class="offerTimeSep">&nbsp;</span><span class="offerTimeContent">{snn}</span><span class="offerTimeEnd">&nbsp;</span>', serverSync: serverTime});
    });
$(“.TimeLeft”)。每个(函数(){
$(this).countdown({until:newdate($(this).text()),格式:'HMS',compact:true,
布局:{hnn}{mnn}{snn},serverSync:serverTime});
});
在Firefox和Chrome中都能完美工作——插件返回到截止日期的正确时间,但IE和Safari只显示了Nan


我尝试使用不同的时间格式,如日期和小时,但没有成功。

也许你想使用DateRegex来表示“那个东西”,称为IE:

我希望这个链接能对你有所帮助

我不知道Safari的解决方案是什么,但请尝试使用IE方式。

可能重复的