In that case, $.live is not used for that. $.live works for browser events like mouseover, mouse clicks, field focus, etc. For your issue, just put the converter code into a function of its own and run it again after your ajax is completed and the DOM is modified with the new content. Otherwise you can try to modify the content before you actually insert it into the DOM. Is that possible? (Either at the server-side or after it's received through AJAX.)
On Aug 6, 7:25 am, Nic Hubbard <nnhubb...@gmail.com> wrote: > Sorry, I slipped up while typing. I meant I am NOW using ajax as > well. > > Using ajax I bring in new content such as: > > <span class="ISODate">my iso date</span> > > Each time I insert these into the DOM they need to be converted. The > above script was used to convert them on page load and did not account > for content being added using ajax. > > On Aug 5, 5:14 pm, James <james.gp....@gmail.com> wrote: > > > It's not clear what you want to do. You said you are "not using ajax" > > but you have content "brought in through ajax". What exactly do you > > need $.live for? For what browser event? > > > On Aug 5, 1:17 pm, Nic Hubbard <nnhubb...@gmail.com> wrote: > > > > Anyone? Someone must have done this... > > > > On Aug 5, 11:32 am, Nic Hubbard <nnhubb...@gmail.com> wrote: > > > > > I have a script that runs when I load the page which converts some > > > > dates. I am not using ajax as well, and I need to use .live to > > > > convert the dates that I brought in through ajax. How would I > > > > combine .live with .each and make it work? > > > > > if ($("span.ISODate").length > 0) { > > > > $("span.ISODate").each(function() { > > > > $(this).text(getTFID($(this).text())) > > > > }); > > > > > } > >