implementing the live() function solved this problem.

http://docs.jquery.com/Events/live#typefn

On Aug 10, 9:53 am, Ram <yourstruly.vi...@gmail.com> wrote:
> anyone? any ideas at all??
>
> On Aug 7, 4:38 pm, Ram <yourstruly.vi...@gmail.com> wrote:
>
> > Hi,
>
> > Im using jNice (a jQuery plugin) in rails. I have the following jQuery
> > function on the head of my page.
>
> > <script type="text/javascript">
> >                 jQuery.noConflict();
>
> >                 /* calling jNice on document ready */
> >                 jQuery(document).ready(function($)
> >                 {
> >                         $('div.jNice').jNice();
> >                 });
> > .....
> > </script>
>
> > On page load, this gets called correctly.
>
> > Now there's a link on the page that lets me add more rows and i do
> > this viaRJS. Here's the code.
>
> > <tr id="empty_item">
> >     <div  id="plussign"><%= add_item_link "+" %></div>
> > </tr>
>
> > def add_item_link(name)
> >    link_to_function name do |page|
> >      page.insert_html :before, :empty_item, :partial=>'item', :object
> > => Item.new
> >    end
> > end
>
> > Now this partial 'item' contains form elements upon which jNice needs
> > to work its magic.
>
> > How can I call the jNice function after the user clicks on the
> > add_item_link?
> > Thanks.

Reply via email to