Jump to content

hover image not working after .html


dsp77

Recommended Posts

the script shows an alternative image on mouse over using the rel atribute the second part takes a hidden div and shows the content in another place on the same page but when i hover the image the image doesn't change, the hover on the hidden div works, but after moving it on click in other place the hover doesn't work in the new place. I think it might be the document ready script because i alter the page after ready but i'm not sure, any advise? thank you

$(document).ready(function(){
$(function() {
	$('img[rel]').hover(function() {
		$(this).attr('tmp', $(this).attr('src')).attr('src', $(this).attr('rel')).attr('rel', $(this).attr('tmp')).removeAttr('tmp');
	}).each(function() {
		$('<img />').attr('src', $(this).attr('rel'));
	});
	$('.id2').one("click",function() {
		 var newPara = $('#test').html();
		$('#big_photo').append(newPara);
	});	
});
});

Link to comment
https://forums.phpfreaks.com/topic/248084-hover-image-not-working-after-html/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.