-3
I have several images in lists,
http://www.shopluxo.com.br/arquivos/ids/177260-150-150/212-Vip-toast.jpg
I would like to change only the 150-150 to 200-200.
I can change just one.
-3
I have several images in lists,
http://www.shopluxo.com.br/arquivos/ids/177260-150-150/212-Vip-toast.jpg
I would like to change only the 150-150 to 200-200.
I can change just one.
1
I didn’t test, but considering 'image' being the link you passed, it probably works:
imagem = imagem.replace("150-150", "200-200");
1
Assuming there is no possibility of that expression 150-150 repeat in any part of the URL, it would be something like this:
$( document ).ready( fucntion() {
$( 'ul#something li img' ).each( function() {
var path = $( this ).attr( 'src' );
$( this ).attr( 'src', path.replace( '150-150', '200-200' ) );
});
});
Sets the seal, iterates and for each image found you get the path, steps to replace and redefine them.
Thank you very much Bruno
Good thing it worked, 'cause I didn’t even test it >.<
Browser other questions tagged jquery
You are not signed in. Login or sign up in order to post.
Code you’ve been making?
– CesarMiguel