How to get rid of a JQUERY APPEND GIve the following code...
Posted
by nobosh
on Stack Overflow
See other posts from Stack Overflow
or by nobosh
Published on 2010-04-11T17:20:21Z
Indexed on
2010/04/11
17:23 UTC
Read the original article
Hit count: 205
Given the following lines of code which is using JQTOUCH:
$('#customers').bind('pageAnimationEnd', function(e, info){
if (!$(this).data('loaded')) {
$('.loadingscreen').css({'display':'block'});
$(this).append($('<div> </div>').
load('/mobile/ajax/customers/ .info', function() {
$(this).parent().data('loaded', true);
$('.loadingscreen').css({'display':'none'});
}));
}
});
How can I get ride of the .append($(' '). It used to be append($('loading') but I didn't need that and now it seems like a waste of processing time to have in the function.
Is it possible?
© Stack Overflow or respective owner