私は自分のウェブサイトにいくつかのクールな効果を加えようとしています。今はユーザーがトピックを選択したいと思っています。今私は4つのトピックを持っていて、4つのクールな写真を見つけました。それらを「写真のリンク」として望みます。例:ユーザーが画像の上に彼のマウスを移動する場合 マウスが画像上を移動したら、何かしますか? Javascript Jquery
<a href="{{ action('Test\\[email protected]', [1]) }}">
<img src="/pictures/Gaming.jpg" alt="Gaming" style="width:280px;height:228px;">
</a>
<a href="{{ action('Test\\[email protected]', [2]) }}">
<img src="/pictures/Gesundheit.jpg" alt="Gesundheit" style="width:280px;height:228px;">
</a>
<a href="{{ action('Test\\[email protected]', [3]) }}">
<img src="/pictures/Allgemeines.jpg" alt="Allgmeines" style="width:280px;height:228px;">
</a>
<a href="{{ action('Test\\[email protected]', [4]) }}">
<img src="/pictures/Technik.jpg" alt="Technik" style="width:280px;height:228px;">
</a>
は、今私は、のような何かをしたい
、その絵は、いくつかの明るいを取得する必要があり、その後、ブログの場合のようなの名前が書かれるべき私はマウスをゲーム画像上に動かすと、画像は明るくなり、中央にはゲームが立ち上がります。さて、私はまだjavascript/Jqueryを学んでいますが、このようなことはしませんでした。
誰かが私を助けることができますか?
ありがとうございました!
私の試み:
<script>
$(".imgClass")
.mouseenter(function() {
console.log("Enter to "+$(this));
})
.mouseleave(function() {
console.log("Leave to "+$(this));
});
</script>
<a href="{{ action('Test\\[email protected]', [1]) }}">
<img class=".imgClass" src="/pictures/Gaming.jpg" alt="Gaming" style="width:280px;height:228px;">
</a>
"imgClassは "''クラス=" imgClass" で '私の答え@ItzeMe – simon