Created
January 4, 2011 01:08
-
-
Save subtleGradient/764252 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<form> | |
<input type="datetime" data-behavior="TimePicker" data-timepicker-pad="true" data-timepicker-labels-hours="HR" /> | |
</form> | |
<a href="#my_modal" data-behavior="TargetModal">Open Modal</a> | |
<div id="my_modal" data-behavior="Modal" data-modal-style="color:#333; opacity:0.7"> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
</div> |
That's similar to what I had in mind for modal in my example...
Agreed, that's another good way to do it. I'd use data-modal='{foo:"bar"}'
to set modal-specific options on something that isn't a Modal element.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"For opening up a modal from a link, I would create the modal separately, with its content, and then hook the link up to simple show and hide that thing.
That way all the options for the modal are declared at the modal itself."
Sorry to bump in, but i'd say (too) that the modal (content) can rely alot on the link itself where you'd use a data-modal='{"url":"/page/detail/1"}' attribute or something. I would just put an empty modal template in the page or something (or create default one on the fly if options.template is empty)