Simple problem. I have a js variable I want to be concatenated too within a jQuery selector. However it is not working. No errors are popping up either. What is wrong? How do I correctly concatenate a variable to some text in a jQuery selector.
<div id="part2"></div>
<script type="text/javascript" >
$('#button').click(function ()
{
var text = $('#text').val();
var number = 2;
$.post('ajaxskeleton.php', {
red: text
},
function(){
$('#part' + number).html(text);
});
});
</script>