On Sat, Jul 7, 2012 at 7:44 AM, sanjeev <sanjeevdive...@gmail.com> wrote:
> Hello,
> I am using Ajax Pagination with the help of livequery.js with following code
> in layout
> $('a[href*="sort:"],a[href*="page:"],#searchButton').livequery('click',
> function(){
> $('#content').load($(this).attr('href'));
> return false;
> });
> I put #searchButton with help of Js::submit() function for search records
> which doesn't work
> Thanks in advance.
> Regards,
> Sanjeev Divekar
> --
> 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+unsubscribe@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php
On Saturday, 7 July 2012 23:24:11 UTC+5:30, cricket wrote:
> Please define "doesn't work".
> On Sat, Jul 7, 2012 at 7:44 AM, sanjeev <sanjeevdive...@gmail.com> wrote: > > Hello,
> > I am using Ajax Pagination with the help of livequery.js with following > code > > in layout
> > $('a[href*="sort:"],a[href*="page:"],#searchButton').livequery('click', > > function(){ > > $('#content').load($(this).attr('href')); > > return false; > > }); > > I put #searchButton with help of Js::submit() function for search > records > > which doesn't work
> > Thanks in advance.
> > Regards,
> > Sanjeev Divekar
> > -- > > 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+unsubscribe@googlegroups.com For more options, visit this > group at > > http://groups.google.com/group/cake-php
On Mon, Jul 9, 2012 at 12:20 AM, sanjeev <sanjeevdive...@gmail.com> 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:
On Mon, Jul 9, 2012 at 10:50 PM, lowpass <zijn.digi...@gmail.com> wrote:
> On Mon, Jul 9, 2012 at 12:20 AM, sanjeev <sanjeevdive...@gmail.com> 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+unsubscribe@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php