最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
JQuery 获取父框架的对应ID
时间:2011-08-24 编辑:简简单单 来源:一聚教程网
JQuery 获取父框架的对应ID
我要从b点击找到index里对应的层,等于是要从父框架动态取得对应的层
$(function(){
var curMenuId = undefined;
$("li>a").click(function(){
var menuId = this.id,
target = $('#' + menuId),
doc = window.parent.document;
if (curMenuId) {
$("#" + curMenuId).removeClass("on");
$(doc).contents().find("." + curMenuId).css教程('display', 'none');
}
target.addClass("on");
$(doc).contents().find("." + menuId).css("display","block");
curMenuId = menuId;
});
});
-
上一个: jquery 将dom对像转换成数组对象
相关文章
- jQuery插件jqGrid动态获取列和列字段的方法 05-18
- jquery 获取div的ID 几种方法 06-29
- HTML简单购物数量小程序代码展示 10-31
- html canvas实现弹幕功能 10-31
- HTML中空格表示的意义 10-31
- html area标签解读 10-31