dsp77 Posted September 29, 2011 Share Posted September 29, 2011 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); }); }); }); Quote Link to comment https://forums.phpfreaks.com/topic/248084-hover-image-not-working-after-html/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.