-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jQuery address won't bind on ajax-loaded content #171
Comments
If it helps, I was just playing with jquery address JS file and changed the line on 588 this.on('click', function(e) { Now it seems to work, but I'm sure the .live() method has been deprecated since jQuery 1.7 and has been removed in 1.9 and the suggested replacement is .on method Very strange it works with .live() method and not with .on() method I'm using jquery-1.9.1 with jquery-migrate-1.1.1 |
Well, there are two possible solutions for this.
don't work properly on multiple elements) :
Second is subject to discussion, cause it should rebind links automatically, but it is not compatible with current data-address check in short, replace the binding on line 570
with
and drop data-address check at all - remove lines 569 and 593
result should look like this (untested)
|
Hello, I am using Jquery address along with AJAX SEO (https://github.com/laukstein/ajax-seo)
The problem is the links inside the ajax loaded content is not working. It seems that jQuery address won't bind on ajax-loaded content
I'm trying to achieve a sub navigation style for example lets say in your demo I have clicked on the about link and loaded new content for about page and replaced the content of the '#main_content" div.
The newly loaded content has some links in itself sort of sub links (like sublink1, sublink2, etc) and a new div called "#sub_content".
Now when the sublink1 is clicked i would like to replace the content of "#sub_content" div alone without ever disturbing the '#main_content" div.
I think .address() event is not fired to Ajax loaded content.
Can anyone tell me if it is a bug or am I doing something wrong?
Any help or tips would be great!
--Subramanian
The text was updated successfully, but these errors were encountered: