I am working on mobile site, and I wanted to do mouseover highlighting on my links which have class name "list_anchor" by using jQuery instead of using HTML's :hover pseudo selector. ('cause :hover is bit buggy in Android.)
So I followed this tutorial:
Stop the touchstart performing too quick when scrolling
and I successfully installed touchstart,touchmove function to my links. Happy for a while.
However, I have links which is lively loaded when users scroll(swipe) to the bottom of the page(like Twitter).
The Javascript does not seem to be applied for those links.
Here's what I got so far:
function touchEvent() {
var self = $(this);
self.addClass('hover');
//behaviour for move
self.on('touchmove', function(e){
self.removeClass('hover');
});
}
$('a,section').filter('.list_anchor').on('touchstart', this, touchEvent);
Any help, suggestion appreciated.