$(function()
{
$(".iSmall").click(function ()
{
var thesrc = $(this).attr("src");
$(this).before("<img src=\"" + thesrc + "\" class=\"iBig\" />");
});
$(".iBig").click(function ()
{
alert("Clicked the new one");
//determining if I selected the object
});
});
Now, adding the image seems to work fine. However, when I try to select it and remove it, it doesn't seem to select it. What I really don't seem to understand then is why I am not able to select by classname for the image after I have added it to the DOM with before().
All help is greatly appreciated.

New Topic/Question
Reply


MultiQuote



|