Il mio sito utilizza jQuery 1.4.2. Il problema è .replaceWith()
non funziona in IE6 & IE7 in jQuery 1.4.2. Esiste un metodo alternativo supportato da IE6 & IE7 in jQuery 1.4.2?jQuery .replaceWith() alternativo
Il violino è qui: http://jsfiddle.net/8CEwf/1/
lo so, può non sembrare jQuery è collegato ad esso, ma se si guarda nel codice HTML, il jQuery è lì dal jsFiddle non offre la versione 1.4.2
HTML:
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<img src="/v/vspfiles/templates/cyberfront/images/buttons/btn_addtocart_small.gif">
<input type="image" src="/v/vspfiles/templates/cyberfront/images/buttons/btn_go_gray.gif">
<img src="/v/vspfiles/templates/cyberfront/images/Bullet_MoreInfo.gif">
script:
$(document).ready(function(){
$('img[src="/v/vspfiles/templates/cyberfront/images/buttons/btn_addtocart_small.gif"]').replaceWith('<br /><span id="blackbutton" class="mediumbutton" style="display:block;">Add to Cart</span>');
$('input[src="/v/vspfiles/templates/cyberfront/images/buttons/btn_go_gray.gif"]').replaceWith('<input type="submit" class="graybutton smallbutton" name="Go" alt="Go" value="Go" title="Go">');
$('img[src="/v/vspfiles/templates/cyberfront/images/Bullet_MoreInfo.gif"]').replaceWith('<span class="learnmore">Learn More</span>');
});
Opere! Grazie. – henryaaron
Impossibile modificare le pagine principali ... ecco perché sto attraversando l'intero ostacolo. – henryaaron
@ user1090389: Ah, questo ha senso. Beh buona fortuna! :) – Purag