I have a table
<table style="width: 100%;" class='table_result'>
<tr><td>Text</td><td>Text</td><td>Text</td><td>Text</td><td>Text</td><td>text</td></tr>
</table>
Then when a button is clicked I call this
$("table.table_result").append('<tr class="topRow" style="height: 35px;">
<td 'style="text-align: center; cursor: pointer">'+ text
+'</td><td style="text-align: center">'
+'<input class="control_voteUp" type="button" value="Up">'
+ text
+'<input class="control_voteDown" type="button" value="Dn">' +'</td><td style="text-align: center">'+ text +'</td><td style="text-align: center">'+ text
+'</td><td style="text-align: center">'+ text
+'</td><td style="text-align: center">'+ text +'</tr>');
So I want when control_voteUp is clicked to call a function.
I have tried the normal way and other with no succes:
$('input.control_voteUp').click(function()
{
alert("aa");
});
$('input.control_voteUp').delegate('input', 'click', function()
{
alert("aa");
});
$('input control_voteUp').live('click', function()
{
alert("aa");
});
Any solution?
In your live function call you are missing a .
Change
input control_voteUptoinput.control_voteUpTry: