1

i would like to create a dropdown list, which the options there will be links, i didnt find a simple way of doing it. Can someone maybe put a little example of how it can be done ?

Thanks

1
  • So the result is you want there to be a drop down and when you click it, it's actually a link, so it goes to some controller action? You can do this with JS watching the options being clicked (but still using a normal select element), or go the route of making a drop down yourself using DIVs. Commented Jan 23, 2014 at 17:06

1 Answer 1

3

You can make a real simple dropdown using jquery slideToggle().You can convert the html to haml or erb or whatever you're using for rails

$(".button").click(function(){
    $(".dropdown").slideToggle();
});

JSFIDDLE

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.