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

Knockout 'click' event within popover #45

Open
Mior opened this issue Feb 19, 2014 · 1 comment
Open

Knockout 'click' event within popover #45

Mior opened this issue Feb 19, 2014 · 1 comment

Comments

@Mior
Copy link

Mior commented Feb 19, 2014

Problem occurs when using binding with 'data' in popover with 'click' knockout binding. Click binding doesn't seems to work. Solution could be to have binding within click function of custom binding for popover.

binding:
data-bind:"popover: {template: 'popoverBindingTemplate', placement:'bottom', data: $someData}"

template:

<script type="text/html" id="popoverBindingTemplate">
    <button class="close" data-dismiss="popover" type="button">
        <i class="fa fa-times"/>
    </button>
    <ul class="list-unstyled ce-tag-list" data-bind="foreach: messages">
        <li>
            <a class="label label-primary" href="#" data-bind="click: function(){alert('Click');}, text: label"></a>
        </li>
    </ul>
</script>
@bertvh
Copy link

bertvh commented Jul 22, 2014

Doesn't work for me either. In fact, I can't get any binding inside a popover to work. It's only click events.

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

No branches or pull requests

2 participants