On 29.5.2008, at 12.41, DAZ wrote:
Hi, Is there a way to use prototype and scriptaculous to search through a page of html for any <ul> elements with a class of 'sortable' and then make them into sortable lists. Would this be possible to do from an external js file?
Yes! I find this a perfect case for Low Pro:
Event.addBehavior({
'ul.sortable' : List.Sortable
});
You'd have to create List.Sortable yourself if you don't find such a
behaviour from the 'net. It's not too bad, though: http://www.danwebb.net/2007/7/18/low-pro-behaviours-101-part-2
You might want to have a look at Dan's example behaviours as well: http://svn.danwebb.net/external/lowpro/trunk/behaviours/ //jarkko
I'm thinking that this would be a nice way to make a list sortable without having to use the rails helper and adding some messy inline javascript into the html.... thanks, DAZ --~--~---------~--~----~------------~-------~--~----~You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group.To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
-- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi
smime.p7s
Description: S/MIME cryptographic signature
