SiteApps Team
posted this on April 05, 2011 17:19
<BODY> tag and some objects you may refer to are not yet created.jQuery(document).ready(function() {
// do stuff
});
document.writeln() will not work. Do always test your app in development to make sure the asynchronous calls don't your app.document.writeln(). Here's an example of how to append code using jQuery:document.writeln('<div id="newdiv">your code</div>');
var code_to_add = '<div id="newdiv">your code</div>';
jQuery(code_to_add).appendTo('body');
When you talk about site loading performance, every byte counts. Do consider optimizing your code to load as quick as possible. Below are some tips on how to minimize code size:
var d=document;.
Consider using a Javascript compression tool. Below are some suggestions:
Other great reads regarding performance and optimization:
IMPORTANT NOTE: SiteApps is not responsible for errors or conflicts the suggestions above may cause to your code.
People still do judge a book by it's cover. When you submit your app do make sure to submit pretty icons and attractive screen captures. Also spend some time being descriptive about your app and what problem it solves. This is specially important for paid apps.