Is it possible to trigger the mouseout event on a link element using jQuery?
those. Something like that
$(linkEle).mouseout()
I want this to work on an iPad, which, although it has no mouse cursor, does have an event ...
Yes, jquery has a mouseout event handler - http://api.jquery.com/mouseout/
$('some_selector_here').mouseout(function() { // Do some stuff } $('some_selector_here').trigger('mouseout');
You might be able to use:
.trigger('mouseleave');
In the shape of:
$('#elementToTriggerMouseLeaveOn').trigger('mouseleave');
Literature:
trigger()
I do not know about ipad, but it works as you posted. http://jsfiddle.net/tESUc/
$(linkEle).mouseout();
or
$(linkEle).trigger('mouseout');
$(linkEle).trigger($.Event('mouseout'));
Try with tap event
click - fires after clicking the pnscreen element.
http://www.roccles.com/?p=134
$('.link').live('tap',function(event) { //TODO });
Mouseover state does not exist on touch screens
Mouse / exit events do not work on demand on the ipad. Take a look at touchstart / touchmove and tap on events that are specifically designed for touch devices.
Something like this http://jsfiddle.net/hTYKQ/ Will work on ipad, but this way:
The 1st click on an element launches the mouseenter function.
mouseenter
2nd click starts the material .. if it has material ... as a link ( http://jsfiddle.net/qxM33/1/ I screwed <a> href , but you get the point.)
<a>
href
Click outside the element, launches the mouseleave function.
mouseleave
This article talks about how the jquery mouse over and mouse out functions work just like the ipad click functions.
Source: https://habr.com/ru/post/893706/More articles:The key for objc_setAssociatedObject saves the address change - objective-csvn: URL of an existing dierctory does not match the expected URL - svnThe WinForms property grid will not let me change the value of the structure - c #Problem with updating Subversion - svnUsing Javascript HTML5 typed arrays from Java using ScriptManager (Rhino), how? - javaMysql - Finding the reason for temporary disk tables - mysqlDoes the Javascript community have a dependency (e.g. maven or gem)? - javascriptsvcutil from wsdl file: Schema error with target namespace not found - wcfhow to translate when from a socket.io loop - node.jsWhat is a good Java library for dynamic operations with SOAP clients? - javaAll Articles