javascript - jquery script doesnt work in ie -


when click on thumbnails, script change link , image path of big picture, works fine in browsers, except ) ie

    $('.image').click(function(event) {     event.preventdefault();     var imagepath = $(this).attr("href");     var newimg = new image;     newimg.src = imagepath;     newimg.onload = function(){         $('#big_picture2').hide();         $('#big_picture2').attr('src', imagepath);         $('.product_image_large').attr('href', imagepath);         $('#big_picture2').fadein('slow');     }; }); 

the html looks this:

<a href="/documents/product/#get_image_big.path#" id="thumb1" onclick="return hs.expand(this, { slideshowgroup: 1 } )" class="product_image_large"><img src="/documents/product/#path#" id="big_picture2" border="0" /></a>  <a href="/documents/product/#get_product_images.path#" class="image"><cf_get_server_file output_file="product/#get_product_images.path#" title="#get_product_images.detail#" output_server="#path_server_id#" output_type="0" image_width="45" image_height="41"></a> 

dont disturbed cf_get_server_file dynamic cold fusion code, works fine.

not sure whether solves whole problem, setting onload event after defining src property. calling trouble. other way round.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -