2 Replies Latest reply on Oct 25, 2010 9:12 PM by gkyle001CF

    cfdiv and jQuery

    spill-wjzVEv Level 1
      Hi All,

      I have a cfdiv which is bound to a page that displays the results of a query. on the same page as the cfdiv I have a form which get submited using ColdFusion.Ajax.submitForm once the process has been finished I use ColdFusion.navigate to refresh the cfdiv to display the updated query results.

      Now the problem I have is im trying to select the new item in the query within a jquery function.

      Each row in the results is surrounded with a div with a class of .userListItem

      so I use $('.userListItem:eq(0)') to select the first occurence of a div with the userListItem class. This doesn't work when the item is within a cfdiv, but it does work if I put the item outside a cfdiv.

      Does anyone have any ideas what the problem is?

      Thanks, Richard
        • 1. Re: cfdiv and jQuery

          By any chance does anyone have an answer to this problem?  I have run across the same thing.

          Pages loaded into a cfdiv don't respond to jquery commands, whether I put the jquery on the parent page or on the bound page itself.


          Any suggestions would be appreciated.  I tried using a cflayout accordion instead, but it added whole new layers of headaches that just weren't worth any more time than I already spent on them.


          Thanks for your time

          • 2. Re: cfdiv and jQuery
            gkyle001CF Level 1

            Go figure, after trying and trying, I post the question and then figure out the answer.


            Instead of using document.ready, I used AjaxOnLoad and it worked.


            Many thanks to Ray Camden for offering this suggestion on another issue, it worked here as well!!