I'm guessing you're giving behaviour to your links like this : $('#any .old_path a').click(...);
So, you're giving it to any link that are present in the dom at the place you want when you're executing the former code. Then you're adding elements to the dom with an ajax call. These elements haven't had then behaviour passed to them, so they just act like normal links. You might want to use bubbling, or the easier .live() method<http://docs.jquery.com/Events/live>(I would use live if I were you that is). Hope it solves the problem (pretty sure it will). Michel Belleville 2009/11/9 cavanshir aliyev <cavanshi...@gmail.com> > Nobody knows how to solve this issue? maybe this is the wrong mailing list? > > > On Sun, Nov 8, 2009 at 8:28 PM, cavanshir <cavanshi...@gmail.com> wrote: > >> Hello, >> >> I have page with buttons and links. I wrote a jQuery code that adds >> new css classes to images under clicked links. Also I have an Ajax >> request, which replaces buttons with identical ones, but with >> different content. After ajax executes, the jQuery code does not add >> new classes to images under links, although links and images have the >> same attributes. >> >> Any ideas how to fix this issue. >> >> Thanks. >> Cavanshir. >> > >