I have a page with severl jqGrids, but only one is visible at a time. I want a simple function to return which one is visible at any time. Is there some function like this, which would show which divs are visible:
$('div').each(function(){
if($(this).is(':visible')){
alert($(this).attr('id'));
}
});
Is there something like this that can parse through all jqGrids on a page?
Thanks!
You need probably something like the following
If no grid are on the table you will get
undefinedvalue. If more as one grid is visible you will get the id of the first one.To have array of ids of all visible grids you can use the following code
You can make the above code more safe with the test for
gridexpandos: