Any other scripts on the page? What does the HTML looks like?
Try putting a complete version at jsbin.com exhibiting the lock-up,
nothing looks wrong in the code you posted.
cheers,
- ricardo
On Feb 12, 3:25 pm, Shane shanep...@gmail.com wrote:
Thanks for Viewing,
I have one page that locks
Yes, please post more on it.
The only thing I can think of relating to that code is if you have
tons of tr's and it's binding a click element on every one of them.
On Feb 12, 12:44 pm, Ricardo Tomasi ricardob...@gmail.com wrote:
Any other scripts on the page? What does the HTML looks like?
One more thing: It begins the timeout/loop condition whenever I try to
leave the page. So, whenever I click a row (utilizing jQuery) OR
whenever I just click a menu link (or even just refreshing the page),
it locks up.
I also looked at the resulting html for the page and it's MASSIVE.
Exactly
More: Without filtering the results (pulling every entry from the DB),
there are 4550+- entries.
I'm wondering if it would just be better to write onClick events for
individual row and bypass jQuery altogether here.
Having so many table rows explains it.
Try using event delegation. Rather than binding a click event to every
single row, bind it once to the table, and delegate the actions to
it's child rows. Here are some references to get you started:
http://lab.distilldesign.com/event-delegation/
Thank you, James!! That did the trick. I guess the browser was just
having a tough time with all those bindings.
Here is what I ended up using:
var link;
$('table#target').click(function(e){
var targ = $(e.target);
if(targ.is(table)){
return;
}else if(targ.is(tr)){
link =
6 matches
Mail list logo