Created
May 14, 2014 03:29
-
-
Save svizzari/c7d5670f63507398d208 to your computer and use it in GitHub Desktop.
Lotus Menus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select data-zd-type="select_menu"> | |
<option>Foo</option> | |
<option>Bar</option> | |
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{zd_menu "select" data}} |
It is also possible to use the jQuery plugins for the menus. Jump into the console and look up $.fn.zdSelectMenu
, etc. So, you can select an element in your app, a and call the plugin, i.e.
$('.my-awesome-select').zdSelectMenu();
Relevant reference here: https://github.com/zendesk/ui_widgets#usage
didn't managed to compile the lib successfully during the hackathon, but thanks for the pointers!
Hi,
What add options on ajax response?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using
data-zd-type
will cause the select to be replaced when template is rendered.You can use the Handlebars helper and pass in a collection of data objects
select
andcombo_select
are valid types. If setting the data attribute, add_menu
, like theoption_1.hdbs
file