Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conditional popover #56

Open
mikehaas763 opened this issue Mar 4, 2014 · 1 comment
Open

conditional popover #56

mikehaas763 opened this issue Mar 4, 2014 · 1 comment

Comments

@mikehaas763
Copy link
Collaborator

Looking for opinions. Does it seem like giving the popover binding (or tooltip, etc) a conditional option is a bad idea? I'm thinking it probably is but want input from others.

Current way:

<!-- ko if: someCondition -->
<img data-bind="popover: {template: 'popoverTemplate', trigger: 'click'}" src="img.png">
<!-- /ko -->
<!-- ko ifnot: someCondition -->
<img src="img.png">
<!-- /ko -->

or if there was another option

<img data-bind="popover: {enabled: someCondition, template: 'popoverTemplate', trigger: 'click'}" src="img.png">
@billpull
Copy link
Owner

billpull commented Mar 4, 2014

I am not opposed to the idea the code certainly looks cleaner.

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

No branches or pull requests

2 participants