I have this HTML-markup:
<div id="destination">
</div>
<input id="test" type="text" />
<button id="clicker">Click me</button>
And this jQuery-snippet
$(document).on('click', '#clicker', function(event){
var newCat = $('#test').val();
$(newCat).prepend("#destination");
alert(newCat);
});
The alerted text is indeed the inputed text in the field, but the text does not end up in the div #destination.
See this jsfiddle example:
http://jsfiddle.net/FaAY4/
You must do this: