Thanks Yorick, Can you explain a bit more.?
Regards, On Fri, Jun 7, 2013 at 1:02 AM, Yorick Horrie <[email protected]>wrote: > Hi, > > Don't know if you found this allready, but for those who are reading this > and have the same problem. > This solution works: > > $('body').on('click','#yourSelector',function(event) {//do somethings > here}); > > You need to stick the event on the body (or any other parent dom object > that is not updated, using body is the safe way), so the event still works > if html is added by an ajax request. > > Op dinsdag 10 juli 2012 05:18:55 UTC+2 schreef Sanjeev Divekar het > volgende: >> >> I have already tried this but not working. >> >> On Mon, Jul 9, 2012 at 10:50 PM, lowpass <[email protected]> wrote: >> >>> On Mon, Jul 9, 2012 at 12:20 AM, sanjeev <[email protected]> wrote: >>> > Fist Time it works but after div updated submit click doesn't work. I >>> think >>> > click event lost. >>> >>> Yes, that's likely the problem. I've never used livequery so could not >>> say for sure. I think it should be sufficient to either use JQuery's >>> live() or create a callback that is run when the content loads that >>> initiates the event handler. But you're using Cake's JS helper, which >>> I never bother with, so I can't say more about that. >>> >>> Also, your selector could be made a bit more efficient if you wrap the >>> links with something rather than have to parse the URL of all links on >>> the page. Something like: >>> >>> $('div.Pagination a, #searchButton') >>> >>> -- >>> Our newest site for the community: CakePHP Video Tutorials >>> http://tv.cakephp.org >>> Check out the new CakePHP Questions site http://ask.cakephp.org and >>> help others with their CakePHP related questions. >>> >>> >>> To unsubscribe from this group, send email to >>> cake-php+u...@**googlegroups.com For more options, visit this group at >>> http://groups.google.com/**group/cake-php<http://groups.google.com/group/cake-php> >>> >> >> >> >> -- >> Warm Regards, >> Sanjeev >> http://sanjeevdivekar.**wordpress.com<http://sanjeevdivekar.wordpress.com> >> > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to a topic in the > Google Groups "CakePHP" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/cake-php/kNt2K7oezBE/unsubscribe?hl=en. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Warm Regards, Sanjeev http://sanjeevdivekar.wordpress.com -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
