Re: [jQuery] Replacing a portion of an href value

2010-02-01 Thread Randall Morgan
Hi All, I figured it out. I was making it far more complex than it needed to be ;-) this.href.replace('/s/', '/m/') Thanks, On Mon, Feb 1, 2010 at 6:31 PM, Randall Morgan wrote: > Hi, > > actually my image names (35 of them) as coming from an ajax call and I > loop through the results assign

Re: [jQuery] Replacing a portion of an href value

2010-02-01 Thread Randall Morgan
Hi, actually my image names (35 of them) as coming from an ajax call and I loop through the results assigning the images to the filmstrip cells. Then I setup the mouse overs for the popup preview. If this were php or C I'd have not trouble. But with Javascript and JQuery I'm lost... On Mon, Feb

RE: [jQuery] Replacing a portion of an href value

2010-02-01 Thread Andreas Möller
I don't know about regular expressions in Javascript, but actually you just want to match the name of the image and prepend it with a different path and append a different suffix to, so something like preg_match('/^\com\/images\/s\/([a-z0-9_])+\.png$/', $href, $match); $href = 'com/images/s/' .

[jQuery] Replacing a portion of an href value

2010-02-01 Thread Randall Morgan
Hello, I have the following code which is part of a loop to add preview images to a filmstrip where each cell is made up pf a div. My filmstrip uses a tiny b&w version of the image which is stored in the images/s/ folder. My preview images must come from the images/m/ folder. I have tried using re