Since I don't know how your HTML looks like, I'm assuming in my code
that "img.test" is your set of thumbnails with class "test"
$("img.test").click(function() {
var largePath = $(this).attr('src').replace('_t', '.');
alert(largePath);
// do what you want to do with largePath
});
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 c
var u = $("a#oranges").attr("href")
u.split("_t")[0]
or
u.instring( 0, u.lastIndexOf("_t") )
On Mar 6, 4:34 pm, whoisonfirst 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
var FullImageLocation = img.src.replace('_t.', '.');
On Mar 6, 11:34 am, whoisonfirst 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/o
4 matches
Mail list logo