[jQuery] Re: change image scr of all images in a page

2009-01-20 Thread Giovanni Battista Lenoci
b u d d h a ha scritto: hi, i have more than 20 images in a form which might be refering like this image src = images/search.gif/ i want a jquery script for replacing all image src with image src = http://s.images/images/search.gif/ This is the code, but personally I prefer make changes

[jQuery] Re: change image scr of all images in a page

2009-01-20 Thread Giovanni Battista Lenoci
Sorry i forgot the braces. This is the right code: $('img').each(function() { $('img').attr({'src': http://s.images/+$(this).attr('src')}); }); -- gianiaz.net - web solutions via angelo custode, 10 - 23100 sondrio (so) - italy +39 347 7196482

[jQuery] Re: change image scr of all images in a page

2009-01-20 Thread b u d d h a
i tried but not wrking am placing a sample code which i used script type=text/javascript $(document).ready( $('img').each( function() { $('img').attr({'src', http://localhost/ s.demo/+$(this).attr('src')});

[jQuery] Re: change image scr of all images in a page

2009-01-20 Thread Giovanni Battista Lenoci
b u d d h a ha scritto: i tried but not wrking am placing a sample code which i used script type=text/javascript $(document).ready( $('img').each( function() { $('img').attr({'src', http://localhost/

[jQuery] Re: change image scr of all images in a page

2009-01-20 Thread Shawn Grover
Giovanni Battista Lenoci wrote: Maybe I confused you. You've mixed two types of syntax. You can achieve this with 2 syntax: 1. $('img').each(function(){ $('img').attr({'src': http://localhost/s.demo/+$(this).attr('src')}); }); 2. $('img').each(function(){

[jQuery] Re: change image scr of all images in a page

2009-01-20 Thread Giovanni Battista Lenoci
Shawn Grover ha scritto: You have a slight issue with the samples. The first instance of $('img') inside the function() should be $(this). Sorry, you're right... I've answered without the right attention :-P Giovanni -- gianiaz.net - web solutions via angelo custode, 10 - 23100 sondrio (so)