Mike White
Mike White

Reputation: 131

How can I use Knockout's click binding with jQuery Mobile's vclick event?

In my jQuery Mobile + Knockout.js application all clicks have the 300ms delay before the synthesized 'click' event fires.

Is trying to use jQM's 'vclick' event the right way to address this? If so, how can I accomplish that with the knockout click binding? Should I be using 'tap' instead?

Upvotes: 1

Views: 1051

Answers (1)

Mike White
Mike White

Reputation: 131

Like fab says, the way to do this is with knockout's event binding:

<!-- ko foreach: widgets -->
<li>
    <a data-bind="event: { vclick: $root.clickWidget }">
        <b data-bind="text: $data.name"></b>
    </a>
</li>
<!-- /ko -->

Thanks!

Upvotes: 3

Related Questions