Your site is too slow to load or too slow to respond to clicks and other user interaction, and you don’t know why. What part of the code is taking so much time?
Use a profiler, either one of the many available ones or a simple one you can code yourself.
There are also some profilers specific to jQuery that you can find with a web search for jquery profiler. These let you profile selector performance and look more deeply at jQuery function performance.
For really detailed profiling, where you need to analyze individual sections of code smaller than the function level, you can write a simple profiler in just a few lines of code. You may have coded this ad hoc classic:
var t1 = +new Date; // ... do stuff ... var t2 = +new Date; alert( ( t2 - t1 ) + ' milliseconds' );
+new Date in this code
is just a simpler way of coding the more familiar
new Date().getTime(): it returns the
current time in milliseconds.
Why does it work? Well, the
Date part is the same: it gives ...