ruby on rails - Problems getting AJAX effect to work with RubyOnRails -
I want to delete a line from an HTML table generated by some rail code and I should "slide" the other rows "In the new situation."
I am new in this way and I am sure that I have made a simple mistake.
Here is a partial code to generate table row:
& lt; tr id = "ride_ & lt;% = h ride.id%>" & gt; & lt; td> & lt;% = h ride Name% & gt; & lt; / td> & lt; td & gt; <% = h ride.land%> & lt; / td> & lt; td align = "right" & Gt; & lt;% = h Verti_restriction% & gt; & lt; / td> & lt; td & gt; & lt;% = link_to_remote 'remove' ,: url = & gt; {: action = & gt;: destroyed, ride_id = & Gt; Ride.id} ,: html = & gt; {: Onclick = & gt; "effect. SlideUp ('ride_' + Ride .id.to_s + '' ') "}%> & Lt; / Td> & Lt; / TR & gt;
And here is the partial HTML generated:
& lt; Tr id = "ride_130" & gt; & Lt; Td> Adventure ride & lt; / Td> & Lt; Td> Funny land & lt; / Td> & Lt; Td align = "right" & gt; 40 & lt; / Td> & Lt; Td> & Lt; NewAjax Request ('/ SimpleLype / Ride / Delete; Ride_id = 130', {Asynchronous: True, Recording: True Parameter: 'Authentication_Token ='. '+ EncoderIconprint (' 9f2334b84d2da7eddfbfaadf8138c0a1c8feca47 ')}); Return Back; "& gt; Remove & lt; / A & gt; & Lt; / Td> & Lt; / TR & gt;
Now, the row is fine, but I do not get cool AJAX effects, it's just like "snap"
So far "Puff" is the only effect which I I'm able to work.
Any help or advice will be appreciated.
Update
Could it be that this effect does not work within a table element? I have tried the exact code on almost one unreserved list and it works fine.
I have also found that the animations do not work on tables in jQuery, so I can be out of luck here. Animation is "snapping", so you can try adding a duration option:
Comments
Post a Comment