On 10 April 2010 09:47, Samiron [email protected] wrote:
I have a collection of products that I am showing in a dropdown. Now
at the first view it will show only first 10 products in the dropdown
with an option “more…” at last. if user clicks the “more…” he can
see all the following products in that dropdown list (this is not any
will hide when showing all items.
I don’t know your reasoning for doing this, but assuming it’s to make
a bit cleaner (rather than the fact that the list is HUGE, in which case
searching would be a better UI option anyway) I’d personally do this
jQuery rather than Rails/Ajax. If you’re using Prototype you’ll need
someone who knows that framework to translate this jQuery code.
I’ve tested the code below in Safari and it works fine, you may need to
tweak it for your needs though…
Test option enabling