Skip to content

Instantly share code, notes, and snippets.

@smileyj68
Created June 19, 2012 16:26
Show Gist options
  • Select an option

  • Save smileyj68/2955100 to your computer and use it in GitHub Desktop.

Select an option

Save smileyj68/2955100 to your computer and use it in GitHub Desktop.
Foundation 3 Custom Dropdowns
<label for="customDropdown">Dropdown Label</label>
<select style="display:none;" id="customDropdown">
<option SELECTED>This is a dropdown</option>
<option>This is another option</option>
<option>Look, a third option</option>
</select>
<div class="custom dropdown">
<a href="#" class="current">This is a dropdown</a>
<a href="#" class="selector"></a>
<ul>
<li>This is a dropdown</li>
<li>This is another option</li>
<li>Look, a third option</li>
</ul>
</div>
@shovanco
Copy link
Copy Markdown

I cp-ed this, The drop down option is not showing. http://ow.ly/i/NrH1

@fyllepo
Copy link
Copy Markdown

fyllepo commented Jul 30, 2012

This code doesn't seem to give the desired outcome unless I'm missing something?

There is no dropdown option

@smileyj68
Copy link
Copy Markdown
Author

Has to be inside a form with a class of 'custom
' to work, sorry that's not represented in the gist.

@fyllepo
Copy link
Copy Markdown

fyllepo commented Jul 30, 2012 via email

@fyllepo
Copy link
Copy Markdown

fyllepo commented Jul 31, 2012

Just a quickie,

I'm developing in aspx webforms, which means the whole body of the page is inside a form tag, do you have a legit alternative method?

cheers,
phil

@shovanco
Copy link
Copy Markdown

If you dont mind can we use the custom class? I like how your form is designed.

@smileyj68
Copy link
Copy Markdown
Author

Phil: not right now, but we'd like to and hopefully will in a future version. You could go into the CSS and grab the styles that are based on being inside .custom and abstract them out to something else, a div.custom or just remove that requirement.

@shovanco
Copy link
Copy Markdown

Hay smileyj68, I got the CSS and tried using in my page didnt seem to work. Can you provide us a details information using custom CSS?

@shovanco
Copy link
Copy Markdown

I found the solution, thanks m8

I didn't grab the JS file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment