Skip to main content
Known Participant
September 10, 2010
Question

jquery in bound cfm

  • September 10, 2010
  • 1 reply
  • 421 views

Hi,

I have implemented this filter in a table

http://www.coldfusionjedi.com/index.cfm/2007/8/3/Simple-FIlter-as-you-type-ColdFusion-8-Demo

There is also a button in the outputted table that calls a jquery ajax function on click, it just toggles the visibility of the news item. This worked fine until I abstracted the code from the main cfm page and placed it in the bound cfm.

Does anyone have any idea how to get the jquery working in a bound function?

Thanks,

R.

$("a.toggleVisibility").click(function () {

  if ($(this).html() == 'Yes') {

  $(this).html('No');

$.ajax({

        type: "POST",

        url: "togglevisibility.cfm",

        data: "id=" + $(this).attr('rel')+"&table=events&visible=No",

        success: function(msg){

        }


      });
    This topic has been closed for replies.

    1 reply

    HulfyAuthor
    Known Participant
    September 10, 2010

    The anwer was simple.

    Jquery live()

    Ben Nadel explains it well...

    http://www.bennadel.com/blog/1751-jQuery-Live-Method-And-Event-Bubbling.htm