I am skinning a 3rd party app that has no HTML natively. It all comes back from an onLoad event and a bunch of ajax calls.
I added jQuery to the page. I need to wrap() an element that is dynamically loaded. I can include a plugin if needed.
How do I do this? Thanks.
UPDATE: This works, but is there a better way?
$(document).ready(function() {
(function() {
var length = $(".applicationShell").length;
var h = setInterval(function () {
if ($(".applicationShell").length > length) {
length = $(".applicationShell").length;
clearInterval(h);
$(".applicationShell").addClass("test")
}
}, 100);
})();
});
Well, it seems I can't find a better solution. :( Here is the one I used.
$(document).ready(function() {
(function() {
var length = $(".applicationShell").length;
var h = setInterval(function () {
if ($(".applicationShell").length > length) {
length = $(".applicationShell").length;
clearInterval(h);
$(".applicationShell").addClass("test")
}
}, 100);
})();
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With