javascript - Mouseenter and mouseleave change for mobile and tablet -
how change mouseenter , mouseleave working click? have images , on click show inside. how fix mouseleave, here code in javascript:
$("div.mitarbeiterfoto") .mouseenter(function() { var id = $(this).attr("id"); var idinfo = $(this).attr("id").substr(5); ($(this).find('img').css('display', 'none')); ($('#' + id + '_o').css('display', 'block')); showinfo(idinfo); }) .mouseleave(function() { var id = $(this).attr("id"); var idinfo = $(this).attr("id").substr(5); ($(this).find('img').css('display', 'block')); ($('#' + id + '_o').css('display', 'none')); hideinfo(idinfo); }); please need help!
assigning events work
$('.mitarbeiterfoto').on('mouseenter', function () { var id = $(this).attr("id"); var idinfo = $(this).attr("id").substr(5); ($(this).find('img').css('display', 'none')); ($('#' + id + '_o').css('display', 'block')); showinfo(idinfo); }); $('.mitarbeiterfoto').on('mouseleave', function () { var id = $(this).attr("id"); var idinfo = $(this).attr("id").substr(5); ($(this).find('img').css('display', 'block')); ($('#' + id + '_o').css('display', 'none')); hideinfo(idinfo); }); $('.mitarbeiterfoto').on('click', function () { //click });
Comments
Post a Comment