开发者

Addclass not working in IE8 jquery

开发者 https://www.devze.com 2023-02-04 15:34 出处:网络
Addclass isn\'开发者_开发问答t workign in IE in the following code: $(\"tr\").find(\"td:eq(0)\").addClass(\"header\").css(\"width\",\"300px\");

Addclass isn'开发者_开发问答t workign in IE in the following code:

$("tr").find("td:eq(0)").addClass("header").css("width","300px");
$("tr").find("td:eq(1)").addClass("data").css("width","500px;");


It was bad markup on my part. Didn't close "TD" tags and didn't remove a legacy "CENTER" tag on the page. Thanks all!


$trFind = $("tr").find("td:eq(0)"); $trFind.addClass("header").css("width","300px");

That's how it should work.


Maybe someone will still have the issue and looking for a solution:

jQuery Add and remove Classes not working IE8


see that:

jQuery issue in Internet Explorer 8

0

精彩评论

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