jqgrid和jquery选项卡:加载文本不会隐藏 [英] jqgrid and jquery tabs : loading text doesn't hide

查看:57
本文介绍了jqgrid和jquery选项卡:加载文本不会隐藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jquery UI选项卡(1.8.9),并且我的网页中有一些选项卡.

i am using jquery UI Tabs (1.8.9) and i have some tabs in my web page.

在每个选项卡上,我都有一个jqGrid 3.8.2,它将在页面加载时加载json数据.

On each tab, i have a jqGrid 3.8.2 which is loading json data at the loading of the page.

对于第一个选项卡,一切正常,我看到从jqGrid加载黄色框,它消失了.但是问题是,当我移到另一个选项卡时,我看到加载了jqGrid,但是我有来自JQGrid的小loadui仍然出现在所有隐藏选项卡的jqgrid上.刷新将其隐藏..

For the first tab, everything is ok, i see the Loading yellow box from jqGrid and it disappears. But the problem is, when i move to another tab, i see the jqGrid loaded but i have the small loadui from JQGrid still appearing on all jqgrid of hidden tabs. Refreshing hides it ..

这是一个错误吗?我可以解决的问题吗?还是有一种方法可以在我更改选项卡时将其隐藏? (我尝试在更改标签时隐藏$(.loading"),但无法正常工作..

Is it a bug ? something i can fix ? or is there a way to hide it when i change tab ? (i have tried hiding $(".loading") when i change tab but it doesn't work ..

一个细节:仅在IE7中做到这一点,而不是在Firefox和Chrome中

Hmmm one detail : it does that only in IE7 not in Firefox nor Chrome

谢谢

推荐答案

jqGrid最多使用两个div来显示加载过程.如果loadui具有默认值'enable',则使用ID带有前缀load_的一个div.如果您使用loadui等于'block',则会使用ID为前缀lui_的附加叠加层div.

jqGrid use up to two divs to show the loading processing. if loadui has default value 'enable' one div with the id having prefix load_ are used. If you use loadui rqual to 'block' an additional overlay div with the id having prefix lui_ are used.

例如,如果将<table>id="list"一起使用,则在数据加载期间将使用的div的ID是'load_list'以及'lui_list'(如果是loadui:'block').另外,在网格加载期间,在网格加载期间,另一个网格参数$("#list")[0].grid.hDiv.loading将设置为true.

For example if you use <table> with id="list" the ids of divs which will be used during data loading are 'load_list' and additionally 'lui_list' (if loadui:'block'). Additionally during the grid loading another grid parameter $("#list")[0].grid.hDiv.loading will be set to true during the grid loading.

因此,您可以在 select 事件处理程序的内部实现="http://docs.jquery.com/UI/Tabs" rel ="nofollow noreferrer"> jQuery UI选项卡隐藏并显示加载div.另外,您可以测试$("#grid_id")[0].grid.hDiv.loading以验证网格是否确实处于加载状态.

So you can implement inside of select event handler of jQuery UI tabs hiding and showing the loading divs. Additionally you can test $("#grid_id")[0].grid.hDiv.loading to verify that the grid is really in loading status.

您可以在此处了解更多有关jqGrid使用的加载潜水的信息.

You can read more about the loading dives used by jqGrid here.

这篇关于jqgrid和jquery选项卡:加载文本不会隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆