fooberry

Sweetness without context.

jQuery and UpdatePanels

January 6th 2009

While using a jQuery plugin to round corners, they started to disappear inside UpdatePanel’s after a partial post back. I found someone else on StackOverflow had the same problem. Luckily, the solution was right there as well.

$(document).ready(function() {
    doReady();

    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_endRequest(function(s, e) {
        doReady();
    });
});

function doReady() {
    $('.roundedCorners').corners();
}

I’m interested in trying the livequery jQuery plugin, but will go with this for now.

blog comments powered by Disqus