1

I'm using livequery on document.ready to apply certain functionality and styling to all elements with a specific class. I want it to apply to all elements that will ever show up, so I'm using livequery, and some of the code is not event-based, so I can't use delegate.

The code works beautifully for most of the page - even for some content that is not there when the page is originally loaded, but added later via ajax. The problem is with some cfwindows - when I open a cfwindow, I would expect the livequery code to apply to all the cfwindow content as well, but it doesn't. Something in the cfwindow seems to prevent the code from bubbling up. (I'm using a cfwindow with a "source=" attribute.)

What can I do to get around this?

froadie
  • 79,995
  • 75
  • 166
  • 235

1 Answers1

0

1) In your main page create a js function that will apply your styling/formatting to elements displayed in your cfwindow. This function can not have any arguments.

2) at the bottom of the page(s) that you display in cfwindow add

<cfset ajaxonload('name-of-your-js-function-here')>
azawaza
  • 3,065
  • 1
  • 17
  • 20