Sign in to follow this  

[web] Accidentally cleared my events?

Recommended Posts

Not exactly game related, but a little test webapp I'm working with has a bug which has stumped me and my more experienced co-workers. The site is fairly simple. I have a jquery topnav bar (superfish if it matters). I have a simple text input field to do searches. And I have a paging grid to display search results. The grid makes a simple ajax call and the inner bits of it are removed from the dom and a new table inserted to replace the old. I stole the grid from a larger site I work on, and it works great there. It has a searching bit, which works great there. In this little prototype though I have problems. Basically when I do a search which causes the grid to re-populate, all my events stop working. The top-nav menus don't mouseover. I actually got one of the menus to stay open because the mouse-off event stopped working in mid-popup. The 'enter key' key event on the search input stops working, the pager buttons... pretty much everything. Hover css styling still works. I can go into firebug and manually put an event on one of the buttons (like alert on hover) and that is still triggered. From what I understand, the only thing that can really cause this is a jquery empty() on a parent of the dom objects holding the events. I looked for that but empty() is only ever called in the inner grid bits. And I don't touch anything near the top-menu, but that gets broken too. I've checked to make sure that there's no id duplication in the dom. I've checked that there's no malformed data in the scripts. I've stepped through the repopulation code and it exits nicely. Firebug and the other webdev plugin I have report no javascript errors, making me think it's expected or undefined behavior I'm just not aware of or jquery getting stuck somewhere... But pretty much the same exact thing works just fine on the other site. Any ideas? I have no idea at this point. jquery 1.3.2, firefox 3.6.2, whatever iis comes on windows 7 if it matters.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this