Yos*_*sef 0 jquery jquery-selectors internet-explorer-7 internet-explorer-6
jQuery .next()- 与6 + 7不兼容(在netbeans编辑器中写警告).
在jQuery中存在ie6 + ie7中有哪些选项?
删除编辑因为havy代码
谢谢
next 在IE6和IE7中工作得很好.
例:
HTML:
<div id='container'>
<div>Target A</div>
<div>Target B</div>
<div>Target C</div>
</div>
Run Code Online (Sandbox Code Playgroud)
JavaScript的:
jQuery(function($) {
$("#container div").click(function() {
var next = $(this).next();
if (next.length == 0) {
display("There's no div after this one");
}
else {
display("The next div's text is: " + next.text());
}
});
function display(msg) {
$("<p/>").html(msg).appendTo(document.body);
}
});?
Run Code Online (Sandbox Code Playgroud)
在IE6和IE7中经过测试和工作,两者都在jQuery 支持的浏览器列表中.
| 归档时间: |
|
| 查看次数: |
2507 次 |
| 最近记录: |