0

I want to achieve a selection box in the drop down window.(I'm using something like

<%= f.select(:season, options_for_select(['spring/fall', 'winter', 'summer'], 'spring/fall'))%>

for the selection box for now)

In this window, I want to have many icons. The user can select one of these icons. And the selected icon will be saved in the database as one attribute of the object.

Can I do this without JavaScript?

Ahmed Salman Tahir
  • 1,783
  • 1
  • 17
  • 26
Dong Yan
  • 3
  • 1

1 Answers1

0

Yes it is possible to use the background-image property to set icons in a dropdown, but apparently it only works in Firefox

See this question for discussions of how to do it with JS putting images with options in a dropdown list

Community
  • 1
  • 1
Ben Fischer
  • 6,382
  • 2
  • 17
  • 22