This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Long click in Custom JS
#6
You can over-ride original vclick handler like this:
Code:
var el = $('.testclass').get(0); // element reference
var ev = $._data(el, 'events').vclick[ 0 ]; // first vclick event
var orig = ev.handler; // original vclick event handler function
ev.handler = function(e) {
  console.log(e);
  orig(e);
};

Note that it will only work for the first .testclass element as $._data() first argument must be a real element reference, not jQuery element collection.
Reply


Messages In This Thread
Long click in Custom JS - by buuuudzik - 06.02.2018, 14:13
RE: Long click in Custom JS - by Daniel - 06.02.2018, 15:59
RE: Long click in Custom JS - by buuuudzik - 06.02.2018, 16:11
RE: Long click in Custom JS - by buuuudzik - 06.02.2018, 20:26
RE: Long click in Custom JS - by admin - 08.02.2018, 09:32

Forum Jump: