$(document).ready(function(){
// Hide all large images except the first one
$('#imageContainer img').hide().filter(':first').show();
// Select all thumb links
$('#thumbContainer a').hover(function(event) {
// Hide all large images except for the one with the same hash as our thumb link
$('#imageContainer img').hide().filter(this.hash).show();
},
function() {} // Because the hover method has a mouseout state we need to define too
);
});
Ce script .js fonctionne pour une souris sur un point d'ancrage. Cependant, je voudrais que cette fonction fonctionne sur un div entier.Échange d'image jQuery pour planer au-dessus des
Comment modifier cette partie: .filter (this.hash) .show();
à ceci:.. .filter (ce (id ou nom unique) .show();
Merci
Prenez soin
Je pense que vous aurait pu signifier un '#' au lieu du '.' – KyleFarris
Où? peux-tu élaborer? – bendewey