$('.editTime').click(function(){
var thisId = $(this).closest('td').attr('id');
alert($('#'+thisId).html());
$('#'+thisId).html("Some Text");
alert($('#'+thisId).html());
});
<td class='editTime' id='someId'><a href='#'>Some Original Text</a></td>
When a user clicks the link in the td, the data in the cell should change from "Some Original Text" to "Some Text". In the browser window it does not change. The alerts however do show the new data in the cell. Any idea whats going on here?
$(this).attr('id');with$('#'+thisId).find('a').html("Some Text");$('.editTime').click(function(){ ...but your<a>is not$('.editTime'), that's your<td>:/ so it's not the jQuery which is odd, it just you're being not careful