Fuhrmann
Well-known member
So, i am loading a page with ajax.
I am at page one with 3 elements. All the elements have the class "PublicLink", so when i click in the "PublicLink" it is called a jquery function that i made.
Element 1
Element 2
Element 3
When i click on the link to go to the next page, i will have two more elements all with the same class.
But then, when i try to click inthe "PublicLink" of the new objects added to the dom, nothing works.
I now there is the "live()" function in jquery, i though that it is exactly what i am looking for, but, does not work!
Any help to make this work?
I am at page one with 3 elements. All the elements have the class "PublicLink", so when i click in the "PublicLink" it is called a jquery function that i made.
Element 1
Element 2
Element 3
When i click on the link to go to the next page, i will have two more elements all with the same class.
But then, when i try to click inthe "PublicLink" of the new objects added to the dom, nothing works.
I now there is the "live()" function in jquery, i though that it is exactly what i am looking for, but, does not work!
Code:
XenForo.PublicLink = function($link)
{
$link.live('click', function(e)
{
//do stuff
});
}
Any help to make this work?