i know that theoretically i should be using .sortable("refresh") in this scenario but a) it's never worked for me, haven't tried changing it in a few weeks though. b) this same issue happens with other plugins too...tablesorter, pretty much anything that happens in this sequence..
--adam On Apr 3, 1:16 pm, ajpiano <[EMAIL PROTECTED]> wrote: > hmmm, > my problem isn't that bound events aren't there after elements are > ajaxed in - i understand that issue. mine is like this: > > let's say i have the following > --------------------------------- > <ul id='myid'> > <li>1</li> > <li>2</li> > </ul> > <a id='clicker'>clickMe</a> > > function setupSortable() { > $('#myid').sortable(); > > }); > > $(function() { > setupSortable(); > > $('#clicker').click(function() { > $('#myid').append("<li id='li3'>3</li>"); > $('#li3').load("newcontent.php"); > setupSortable(); > > }); > }); > > ------------------------- > > my problem is that if you click #clicker, i'll get a JS error saying > that $('#myid').sortable is not a function. (i think) i totally > understand that if you ajax in an element, it won't have preexisting > events bound to it, but i haven't read a word about jQuery plugin > methods that are accessible at the top of the function scope not being > accessible later on down... > > --adam > > On Apr 2, 2:43 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > > > I can take credit for it. :-) > > > Very glad that you liked it. Thanks for the compliment! > > > --Karl > > _________________ > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > > On Apr 2, 2008, at 2:20 PM, tlphipps wrote: > > > > I can't take any credit for the article. I thought it was very well > > > written though! > > > > On Apr 2, 10:18 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > >> Dude! That's exactly what I was looking for! > > > >> And I actually understand your solution too, which is a huge bonus > > >> for > > >> me. > > > >> Thanks for your time :) > > >> Steve > > > >> On Apr 2, 3:05 pm, tlphipps <[EMAIL PROTECTED]> wrote: > > > >>> I think the following like may explain the problem you're > > >>> experiencing > > >>> (if I'm understanding the problem > > >>> correctly):http://www.learningjquery.com/2008/03/working-with-events-part-1