I am going crazy trying to wrap my head around the syntax. I feel I'm so
close to solving this. I don't want to change the function syntax --
$("#section_select a").click(function(){

------

$("#section_select a").click(function(){

}
  //I just need to get the img src of the current thumbnail clicked minus
the _t so it can be passed to var largePath . All the thumbnails have
classname of "test"

        var largePath = 
        $("#largeImg").attr({ src: largePath });

);

-----

I have tried endless permutations. I guess I just don't know the proper
syntax for 
 img.src.replace('_t.', '.');  and how to apply it to my case.

//var largePath = $(this).attr("img.src.replace('_t.', '.')");
//var largePath = $("#watermarkid").attr("src"); 
//var largePath = $(this).attr('src');
//var largePath = $(this).attr("img.src").replace('_t.', "_on.$1");
//var largePath = $(" ").src(this.src.replace('_t.', '.') 
//var largePath = $(".test").attr("src.replace('_t.', '.')");
//var largePath = img.src.replace('_t.', '.');
//var largePath = this.src.replace('_t.', '.');
//var FullImageLocation = img.src.replace('_t.', '.'); 
//var largePath = $(".test").attr('src');
//var largePath = $(this).attr("src");
var largePath = $(this).attr('src').replace('_t', '.'); 



MorningZ wrote:
> 
> 
> var FullImageLocation = img.src.replace('_t.', '.');
> 
> 
> On Mar 6, 11:34 am, whoisonfirst <bp.ly...@gmail.com> wrote:
>> I have an image url --- it is enclosed in a href.
>>
>> "images/flavor/websites/oranges_id_t.jpg"  title="oranges"
>>
>> How do I get the url MINUS the _t
>>
>> so it ends up being "images/flavor/websites/oranges_id.jpg"
>>  title="oranges"
>>
>> that I can pass to a variable of this ?
>>
>> --
>> View this message in
>> context:http://www.nabble.com/Subtract-part-of-url-to-pass-new-url-to-variabl...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Subtract-part-of-url-to-pass-new-url-to-variable-tp22375932s27240p22384050.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to