<div dir="ltr">Hi all,<div><br></div><div>I wanted to run this by you. I have a project wherein I have a dropdown inside of a modal. Lets say it says "Users" and "Products". (It is more complex and more than 2 options but this example gets the point across)</div><div><br></div><div>If the user selects "Users", I then need another dropdown to appear below it that contains all of the users, so one can be selected. If the user selects "Products", that dropdown is populated with all of the products.</div><div><br></div><div>In getting this started, I have the secondary dropdown in a div, lets call it <div id="secondary"></div><div><br></div><div>If I open the console, I can hide and show it with $('#secondary).hide(); or $('#secondary').show();</div><div>but I can't seem to get it working inline, in a script tag, on the page. At this point I'm not sure if I need to chase down an asset pipeline issue, or perhaps it isn't working due to the fact it is inside a modal and not immediately rendered. I'm kind of stumped and this is the first time I've done something like this.</div><div><br></div><div>After I defeat this issue, I'll need to populate that dropdown, and I guess I will use AJAX for that? Am open to any advice or input there as well. I'll basically call Users.all or Products.all, but I don't want to hit the database for that until the initial selection takes place... the user might not select ANYTHING from that first dropdown and so would be wasteful to make DB calls at that point.</div><div><br></div><div>Thank you very much for your time and advice,</div><div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Jesse Waites</div><div>Web Developer</div><div><a href="http://JesseWaites.com" target="_blank">JesseWaites.com</a></div></div></div></div></div></div></div></div>
</div></div>