Converting .live() to .on() after upgrading to JQuery-1.7.1 did not fix this function
<p>While I was using JQuery-1.6.1 for my app, I had the following line of code: </p>

<pre><code>$('li.step .step_type.VerifyTableContentsStep input[name*=element_name]').live('autocompletechange', buildTableContents);
</code></pre>

<p>After I upgraded to JQuery-1.7.1, that line stopped working. I read in the documentation that .live() was deprecated and to use .on() instead. I tried that and, following the documentation, changed the line so that it is now like this: </p>

<pre><code>$(document).on('autocompletechange', 'li.step .step_type.VerifyTableContentsStep input[name*=element_name]', buildTableContents);
</code></pre>

<p>But it still does not work. Does anyone have any ideas? I followed the documentation to the letter. Thanks!</p>

<p>UPDATE: Here is my .haml code:</p>

<pre><code>.table_contents_container
  = select_tag :add_column, options_for_select(table_contents.headers_without_data.unshift(['hidden columns...'])), :class =&gt; 'add_column_selector'

  %table

    %tr
      %th.action_column
        = link_to '', '#', :class =&gt; 'sub_item_action add_column', :tabindex =&gt; 999
      - table_contents.rows.first.all_cells.each do |cells|
        %th.content_column{ :class =&gt; "#{'no_data' if cells.no_data?}", 'data-column-id' =&gt; cells.id }
          = link_to '', '#', :class =&gt; 'sub_item_action inline_delete', :tabindex =&gt; 999
          %span= cells.name
      %th &amp;nbsp;

    - table_contents.rows.each do |row|
      %tr

        %td.action_column
          - if input_elements 
            = link_to '', '#', :class =&gt; 'sub_item_action inline_add', :tabindex =&gt; 999
            = link_to '', '#', :class =&gt; 'sub_item_action inline_delete', :tabindex =&gt; 999
          - else
            &amp;nbsp;

        - row.all_cells.each do |cell|
          %td.content_column{ :class =&gt; "#{'no_data' if cell.no_data?}", 'data-column-id' =&gt; cell.id }
            - if input_elements 
              = text_field_tag "step[table_contents][][#{cell.id}]", cell.value, :onfocus =&gt;"if(this.value=='Table Value...') this.value='';",:placeholder =&gt; 'Table Value...', :onblur =&gt; "if(this.value=='') this.value='Table Value...'", :disabled =&gt; cell.no_data?
            - else
              = h ParsedLine.new(cell.value).result

        %td &amp;nbsp;
</code></pre>
