Я новичок, и я пытаюсь думать более функционально и очищать свой код - сделайте его более сухим... Я пытался использовать это с зависанием, и это не сработает. Я знаю, что упускаю что-то простое и легкое, но... заблаговременно за помощь.
$('#phone').on({
mouseenter: function() {$(this).attr('src','../web-marketing/images/PhoneBlue.png')},
mouseleave: function() {$(this).attr('src','../web-marketing/images/Phone4.png')}});
$('#email').on({
mouseenter: function() {$(this).attr('src','../web-marketing/images/EmailBlue.png')},
mouseleave: function() {$(this).attr('src','../web-marketing/images/Email4.png')}});
$('#live-chat').on({
mouseenter: function() {$(this).attr('src','../web-marketing/images/ChatBoxBlue.png')},
mouseleave: function() {$(this).attr('src','../web-marketing/images/ChatBox4.png')}});
Попробуйте это, но помните, что телефон, электронная почта и чат-чат должны быть идентификатором тега изображения
$('#phone').hover(
function () {$(this).attr('src','../web-marketing/images/EmailBlue.png');},
function () {$(this).attr('src','../web-marketing/images/Phone4.png');}
);
$('#email').hover(
function () {$(this).attr('src','../web-marketing/images/EmailBlue.png');},
function () {$(this).attr('src','../web-marketing/images/Email4.png');}
);
$('#live-chat').hover(
function () {$(this).attr('src','../web-marketing/images/ChatBoxBlue.png');},
function () {$(this).attr('src','../web-marketing/images/ChatBox4.png');}
);
mouseenter
mouseover
вместоmouseenter
? Аmouseout
вместоmouseleave
?