Jquery 父窗口中移进移出鼠标到Iframe: 移进显示更多内容, 移出隐藏部分内容
2013-01-06 11:04
651 查看
//父窗口中的JS //设置iframe的高度 function heightSet(){ if($.browser.mozilla || $.browser.msie){ bodyHeight =window.frames["iFrame2"].document.body.scrollHeight; }else{ bodyHeight = document.getElementById("iFrame2").contentWindow.document.documentElement.scrollHeight; } document.getElementById("iFrame2").height=bodyHeight; } //Iframe中的JS //去除不符合要求的节点 $(".Stat_list").each(function(){ var sumFirstCategory=$(this).attr("sumFirstCategory"); if(sumFirstCategory==0){ $(this).children("ul").remove(); } }); function hiddenMore(){ //如果数量超过多少就隐藏 var isShowMoreBt=0; $(".subject").each(function(index){ if(index>20){ $(this).nextAll(".subject").css("display", "none"); $(this).parents(".Stat_list").nextAll(".Stat_list").css("display", "none"); isShowMoreBt=1; return false; } }); //如果超过多少就隐藏 $(".category").each(function(index){ if(index>0){ $(this).parents(".Stat_list").nextAll(".Stat_list").css("display", "none"); isShowMoreBt=1; return false; } }); //是否显示省略号 if(isShowMoreBt==1){ $("#showMore_div").show(); } } //鼠标移进移出操作(Iframe) $("#content_all").hover( function () { $("#showMore").hide(); $(".Stat_list").show(); parent.window.heightSet(); }, function () { hiddenMore(); $("#showMore").show(); parent.window.heightSet(); } );
相关文章推荐
- Gridview隐藏列的部分内容,鼠标移到该单元格显示内容
- jQuery实现表单input中提示文字value随鼠标焦点移进移出而显示或隐藏的代码
- 一个列用render渲染的时候,如果列宽度不够,内容多出的部分会被隐藏,无法显示。这时需要一个鼠标滑过提示全部内容的tip功能。
- 鼠标移动到指定位置显示网页内容,鼠标移出隐藏
- [Delphi]让窗体感知鼠标的进入与移出并自动隐藏与显示窗口
- jquery悬停,鼠标移上去显示全部内容(包括多余隐藏内容)
- jquery 显示/ 隐藏 页面中部分内容
- AngularJS实现鼠标移入内容显示,鼠标移出内容隐藏
- jquery 显示/ 隐藏 页面中部分内容
- jquery实现鼠标移上去某元素显示隐藏的内容,移除继续隐藏
- jQuery事件-div的显示隐藏及鼠标的移入移出http://www.cnblogs.com/liuyanmin/p/5146544.html
- jquery显示隐藏更多内容信息实例演示
- jQuery实现表单input中提示文字value随鼠标焦点移进移出而显示或隐藏的代码
- jquery显示隐藏更多内容信息实例演示
- jquery 实现超出部分隐藏,鼠标移动上显示全部文字
- jquery 实现超出部分隐藏,鼠标移动上显示全部文字
- (4)鼠标移动某个区域时候显示内容,移出某个区域的时候隐藏某个内容
- jquery 显示/ 隐藏 页面中部分内容
- jquery 实现超出部分隐藏,鼠标移动上显示全部文字 .
- jquery 实现超出部分隐藏,鼠标移动上显示全部文字