改变页面中所有Iframe中指定元素的样式并设置此Iframe的高度
获取所有的Iframe对象,然后循环设置样式和高度,已封装成函数,如下:
// 改变Iframe中指定元素的样式
function optIframeContent(){
$.each($('iframe'), function(index, item){
console.log();
$(item.contentWindow.document).removeClass('index-list-status-fix').find('.status-fix').addClass('index-list-status-fix');
$(item.contentWindow.document).find('.goto-monitor').hide();
$(item).parent().height($(item.contentWindow.document).find('.status-fix').height()+30);
$(item).parent().children('.loading').hide()
});
};