Reputation: 61
I'm trying to develop a game using jQuery. it will create some div's dynamically using jQuery and also removing unnecessary div's, but after some time my browser going heavy and using lot of process and getting crashed.
If refresh my page, again I'm able to play the game for some time.
Except this remaining functionality working fine..
What is the problem? How to solve it?
Upvotes: 2
Views: 2588
Reputation: 11
You can try display:hidden, if the dom doesn't show up, it won't need the browser to render it.
Upvotes: 0
Reputation: 195
I think Chrome Web developer Tools will help u to solve the problem.
open the tool( Ctrl+Shift+J ) -> Profiles -> CPU Profiles
you will find which process( function ) cost too much time. have a try :-)
Upvotes: 1
Reputation: 2716
Use something like the web developer and/or firebug add on for FireFox to see what is happening to your HTML live and what JS problems you may be having.
Upvotes: 3