動的に生成した要素に対してマウスオーバー(アウト)のイベントを起こす

動的に生成した要素に対してマウスオーバー(アウト)のイベントを起こすjQueryの記述

——————————————————-
$(document).on({
“mouseenter”: function(){
$(this).removeClass(“notouchstyle”).addClass(“touchstyle”);
},
“mouseleave”: function(){
$(this).removeClass(“touchstyle”).addClass(“notouchstyle”);
}
}, “.touch-res”);
——————————————————-

参考サイト

タイトルとURLをコピーしました