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

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -