Welcome Guest. Sign in or Signup

d) Performance

Posted on March 19, 2013 2 Comments

How to set focus on a specific element after page load?

This sample will illustrate how to set focus on a specific element after page load. This sample focusing on autocomplete element. Please open the Results page of this fiddle below to see the focus set on the Cars text box

Posted on May 17, 2012 1 Comments

How to improve the performance of your java script in your page?

Performing as many changes as possible outside of the live DOM structure will improve the performance. Here are some highlights from the following pages: – http://www.nczonline.net/blog/2009/02/03/speed-up-your-javascript-part-4/ – http://gent.ilcore.com/2011/03/how-not-to-trigger-layout-in-webkit.html – http://www.phpied.com/rendering-repaint-reflowrelayout-restyle/ – http://www.youtube.com/watch?v=mHtdZgou0qU Note that the follow things will affect the performance: a) When you add or remove a DOM node Let us say you have […]

Posted on April 26, 2012 0 Comments

What are the common jQuery pitfalls to avoid?

Common mistakes include not understanding how expensive jQuery selectors could be. This article discusses this in detail: Common Pitfalls in jQuery

Posted on March 26, 2012 0 Comments

How to load some Java Script files dynamically and delay calling of document.ready method until all the files are loaded?

You can dynamically download some JS files when the page loads based on some condition as follows. Do this in your script block: var somecondition = true; if(somecondition === true) { $.holdReady(true); $.getScript("www.yoursite/yourJsFile.js", function () { // Downloaded the js file $.holdReady(false); }); } $(document).ready(function() { // This call will be delayed untill the above […]