This is a migrated thread and some comments may be shown as answers.

What is the most appropriated and fastest click event ?

5 Answers 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Yohann
Top achievements
Rank 1
Yohann asked on 09 Apr 2014, 11:31 PM
I've recently came accross this source: http://blogs.telerik.com/appbuilder/posts/13-11-14/jquery-mobile-and-kendo-ui-mobile---a-dom-omparison

where they say 
"Mobile browsers wait 300ms after a tap before firing a click event to ensure the user isn't double tapping to zoom. Because Kendo UI Mobile navigation widgets use a fast click solution, they're instantly activated without the standard delay. This leads to a better user experience as the application feels more responsive.

jQuery Mobile provides a vclick (virtual click) event that attempts to normalize touch and click events in their apps. Instead of listening for click or touch events, you can listen for vclick events to work around the 300ms delay. Whereas Kendo UI Mobile automatically provides a fast click solution, in jQuery Mobile you must explicitly listen for and respond to vclick events."

Is this still accurate ? I can't find any other source about this.

I saw JQuery mobile comes with a "tap" event which seems appropriated. What is the most appropriated and fastest click event ?

Thank you very much

5 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 11 Apr 2014, 09:19 AM
Hello Yohann,

I am not an expert in jQuery Mobile so I cannot comment what is the best approach in jQuery Mobile applications.

In terms of Kendo UI, you can use the build-in click/select events of the widgets or one of the Kendo Touch events (tap/double tap/etc.). They are all specifically designed for touch screen devices compatibility.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Yohann
Top achievements
Rank 1
answered on 12 Apr 2014, 03:12 AM
Thank you, that was very helpful.

However, I don't really understand how to destroy a touchevent without any user interaction, by only calling a function, something that would do the equivalent of:

function bindEventButtons()
{
    $(".buttonJoin").unbind('click');
}

could you give me a quick example please?

Thanks

0
Alexander Valchev
Telerik team
answered on 15 Apr 2014, 03:37 PM
Hi Yohann,

Event handlers are detached through the 'unbind' method. Kendo Touch can be destroyed via its destroy method.

I am not sure what exactly you would like to achieve and why you would like to 'destroy a touchend event'. Could you please provide a more detailed code sample so I can get a better overview of your scenario? Thank you in advance.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Yohann
Top achievements
Rank 1
answered on 17 Apr 2014, 12:12 AM
Thank you alexander,

the reason why I'm looking to destroy a touch event is because I am re-populating a listview where events are attached to some buttons. When I click on a button, it triggers a function thanks to the touch widget.

But When I need to change the data in the listview, the listview is destroyed and re-built and I'm looking to re-bind events to the newly created buttons. So I have to unbind/destroy the previous touch event and rebind it.

No example is given for the destroy method, therefore I assume it is the same as cancel but I don't want to destroy it on any method such as touchstart or hold as demonstrated in the example :

$("#touch").kendoTouch({
        touchstart: function(e) {
            e.sender.cancel(); // e.sender is a reference to the touch widget.
        },
        hold: function(e) {
            // this event handler will not be executed
            console.log(e);
        }
    });


I just want something like

$(".buttonJoin").kendoTouch().destroy();

Or something similar but I cannot find the right syntax.

Thanks
0
Alexander Valchev
Telerik team
answered on 18 Apr 2014, 10:49 AM
Hello Yohann,

You can consider initializing the touch widget on a parent container and use filter to specify child elements that are touchable.
In this way there will be no need to destroy or re-initialize the component when child elements changes.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Yohann
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Yohann
Top achievements
Rank 1
Share this question
or