I created a loop of posts from terms having a block for each term like the following:
Featured image of one post from that term
List of all posts for that term
Right now I’m using 3 terms so it’s 3 blocks with that content. The idea is that when you hover the title of one of the posts from a term, the featured image changes to the one from the post hovered.
It is (kind of) working but when I hover a post title, all images change instead of just the one in the block they belong to. I think it is because I somehow need to use unique ID’s instead of classes for the Jquery but I don’t know how to translate the ID to the Jquery (I’m learning to code in the process of building things)
I found how to use variable for the ID in the jquery, but now the jquery is only working on the first img instance. No matter what link I hover into, the image changes but at the first image….
New Jquery code:
(any other advice on cleaning up code, or better approaches are appreciated. I’m learning and this weird query is the best approach to what I was trying to do lol)
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com