This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//taphover - a solution to the lack of hover on touch devices. | |
//more info: http://www.hnldesign.nl/work/code/mouseover-hover-on-touch-devices-using-jquery/ | |
$('a.taphover').on('touchstart', function (e) { | |
'use strict'; //satisfy the code inspectors | |
var link = $(this); //preselect the link | |
if (link.hasClass('hover')) { | |
//preventDefault and return false will cause any other touches on the element(s) to fail. | |
//to avoid this behavior data() will store the "href". so "href" can be restored. | |
link.attr("href", link.data("href")); | |
} else { |