jQuery Issue

http://174.121.35.250/~grosman/

If you goto the link above and click “SEARCH LISTINGS” at the top and leave all the fields blank and then click Search it will display the search results.

If you hover over the results, you will see a translucent div slide down with a magnifying glass. This is the desired effect.

However, if you change the sorting or goto page 2… the sliding effect no longer works.

Any ideas as to what is going on here?

Thanks :slight_smile:

That’s because jQuery will only “hook” the first time through, so when you reload the div through ajax, the hooks get lost. What you’ll need to do is add an additional call to your jQuery code which will reapply the overlays (the property grid code in grosman-wagman/js/script.js) when you change the content of the div.

Instead of that, you can use .live() so that whenever jQuery is used to adjust the content of the page, it will apply that event to any new or updated elements that are on the page.

That worked! Thanks a ton.