css - How to add a visual feedback on click events on touch devices for websites built with Bootstrap? -


it's been long time i'm building websites using html5 boilerplate + bootstrap still didn't figure out how apply sort of visual feedback/effect (could :hover it's not working) let user aware of clicking link (for example item of mobile menu). client started ask/complain "i cannot understand i'm clicking...". tried adding coloured background on :hover, on :focus, none of them working... how do?!

first add library: jquery.mobile.min.js

javascript:

// simulate hover effect on touch devices $('a.add_hover_effect').on('tap', function(e) {     $(this).addclass('hover_effect'); }); $('a.add_hover_effect').on('touchend', function(e) {     $('a.add_hover_effect').removeclass('hover_effect'); }); 

css:

a.add_hover_effect.hover_effect {     background-color: red;     color: white; } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -