jQuery滑块和IE9-追加和可能的问题
我的IE和jQuery有问题 我在WordPress安装中使用了一个滑块插件,并加载以下代码来创建2个自定义的prev/next按钮:jQuery滑块和IE9-追加和可能的问题,jquery,wordpress,internet-explorer,slider,Jquery,Wordpress,Internet Explorer,Slider,我的IE和jQuery有问题 我在WordPress安装中使用了一个滑块插件,并加载以下代码来创建2个自定义的prev/next按钮: jQuery(document).ready(function($) { var sliderInstance = $("#touchcarousel-1, #touchcarousel-2, #touchcarousel-3, #touchcarousel-4, #touchcarousel-5, #touchcarousel-6").data("t
jQuery(document).ready(function($) {
var sliderInstance = $("#touchcarousel-1, #touchcarousel-2, #touchcarousel-3, #touchcarousel-4, #touchcarousel-5, #touchcarousel-6").data("touchCarousel");
$("body").append('<a href="#" class="arrowleft"><img src="/wp-content/themes/revisor/images/left.png" /></a><a href="#" class="arrowright"><img src="/wp-content/themes/revisor/images/right.png" /></a>');
var arrleft = $(".arrowleft")
arrright = $(".arrowright");
var wrapoffset = $("#wrap").offset();
console.log(wrapoffset.left);
arrleft.css("left" , wrapoffset.left-100);
arrright.css("right" , wrapoffset.left-100);
arrleft.click(function(e)
{
e.preventDefault();
sliderInstance.prev();
});
arrright.click(function(e)
{
e.preventDefault();
sliderInstance.next();
});
$(window).resize(function() {
var wrapoffset = $("#wrap").offset();
arrleft.css("left" , wrapoffset.left-100);
arrright.css("right" , wrapoffset.left-100);
});
});
jQuery(文档).ready(函数($){
var sliderInstance=$(“#touchcarousel-1,#touchcarousel-2,#touchcarousel-3,#touchcarousel-4,#touchcarousel-5,#touchcarousel-6”)。数据(“touchcarousel”);
$(“正文”)。附加(“”);
var arrlefit=$(“.arrowleft”)
arrright=$(“.arrowright”);
var wrapoffset=$(“#wrap”).offset();
log(wrapoffset.left);
css(“left”,wrapoffset.left-100);
css(“right”,wrapoffset.left-100);
向左。单击(函数(e)
{
e、 预防默认值();
sliderInstance.prev();
});
右键单击(函数(e)
{
e、 预防默认值();
sliderInstance.next();
});
$(窗口)。调整大小(函数(){
var wrapoffset=$(“#wrap”).offset();
css(“left”,wrapoffset.left-100);
css(“right”,wrapoffset.left-100);
});
});
在FF和Chrome中,这可以正常工作,但在IE中不行(在IE9中测试)
我被难住了,因为按钮上的命令都不起作用——CSS和事件都不起作用
请参阅此处的页面:删除
控制台。log
--它将在IE中中断,因为控制台仅在开发人员工具打开时可用