[jQuery] Concat
[jQuery] Concat
I have the following jquery in an "gallery" page:
$(document).ready(function(){
$("#thumbnail a").click(function(){
$("#picture a").attr({"href": $(this).attr("href")});
$("#picture img").attr({"src": $(this).attr("href"), "title": $(">
img", this).attr("title")});
$("#picture h2").html($("> img", this).attr("title"));
return false;
});
$("#picture>img").load(function(){$
("#picture>img:hidden").fadeIn("slow")});
});
The page has a list of thumbnails going down the right side, and when
clicking on the tn, this jquery will put the larger image in the
middle of the page (id=picture). Currently it will put the href from
the tn into the ("#picture a").attr above, <a href="image.jpg">, but I
want to be able to slightly change the href by adding a "M" to the
front, <a href=Mimage.jpg>.
So the question is how can I concatenate a letter to the front of the
href attribute?
I am new to query & jquery, I can read it enough to somewhat tell what
it is doing, but don't know enough to do much changing.
I appreciate any help any one can offer.
Thanks
jimmy