hey guys. first, sorry about the vague question title i know that that is totally unacceptable but i just didnt know what the title of this thread should be. sorry(ashamed).
so the "issues" that i am having is regarding this script:
$("#table tr td").live("click", function(){
var row = $(this).closest('tr').css('background', 'LightSlateGray');
var newrow = $(this);
$("#button").live("click", function(){
var name = $(newrow).text();
alert(name);
//var guest = '<span>'+name+'</span><br>';
var guest = '<input type="text" class="input-name" value='+name+' name="GName[]" size="45" readonly><br>';
$("#anothertable").append(guest);
$(newrow).unbind("click");
});
});
what the "issues" are:
1. $(newrow).unbind("click");
doesn't seem to work or i'm just doing it totally wrong because it does not unbind. here i want to unbind what happens to $("#table tr td")
like i want it to "unclick" but it doesn't.
- see
var guest = <span></span>
; the fullname ofname
is displayed. example in#table
i have one row with name Miss Emma Watson this name(in full) is displayed in<span></span>
as it should but when i test it out with<input>
i only get "Miss" in the textbox. is it something in the code that i did not do correctly that messes it up?
TIA!