I have the following code iam trying to make the text div under the image editable by using keyup and using .val() but iam having a problem when i click on another image and edit the textbox to update the new image text they all change.
$('.HeaderGifs').live('click', function() {
var img_class = $(this).attr("class");
var img_src = this.src;
$('#img_prop').css("display","block");
$('#pre_img').html("<img src='"+img_src+"'></img>");
var image_sel_id = img_class.replace("HeaderGifs ", "")
alert(image_sel_id);
$('#alt_text').keyup(function() {
var alt_text = $(this).val();
$('#text_'+image_sel_id).text(alt_text);
});
});
Thank You