torsdag 3 maj 2012

JavaScript Scrapbook addition

A repeater with a nested GridView. All GridViews have their own UpdateProgress controls.
This hides all UpdateProgress divs but the one for the specific GridView that triggered the AJAX call.

$('.applicationRowAction').live("click", function () {
            var tableHeight = $(this).closest('table').height();
            var panelMarginTop = (tableHeight / 2)
            var appId = $(this).parent().parent().find('.divRowAppWrapperId').attr("id").substring(4);
            $('.updateProgress').css('margin-top', panelMarginTop + 'px');
            $('.updateProgress').each(function () {
                var divId = $(this).attr("id").substring(17)
                if (divId != appId) {
                    $(this).hide();
                }
            })
        });

Inga kommentarer:

Skicka en kommentar