Please help! Livequery + History/Remote

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Please help! Livequery + History/Remote

I will try to explain myself as clear as possible:

I have used Ajax in the past. Not with jquery though. I have been working with jquery for about a month. So I know some, but definitely still learning.

I downloaded Livequery:

And had no problems. I got all my ajax requests wrapped up with livequery.

Then I found out about History/Remote:

And I had no problems getting it to work, except when I wrap it with the livequery function.

As I understand, this is the basic livequery function:

$('a') .livequery('click', function(event) {

        return false;

and this is the basic History/Remote function:



I combined both this way:

$('a.remote').livequery(function() {


I removed the "click" from the livequery function because it was causing redundancy. That's probably because the history remote already has the click in it.

The problem is:

Because History/Remote is inside the livequery, the page refresh and page bookmark wont work. It only works after you click the first time on a link. Thus only the forward button and back button work.

If I make an instance of History/Remote outside livequery then the links get all messed up and call the main page inside itself.

Since I am new. I think I not using livequery properly. My links in the HTML are used just like in the example of History remote.

Again, I can get both of them to work, I just cant figure out how to use them together.

I appreciate any help.

PS: I really like jquery. Way easier to learn then mootools