Hi I am in need of some help. Please see my code below. Thanks in advance for any assistance.
$('#input_listName').keyup(function(){
var newList = $(this).val();
$('#btn_createList').click(function(){
('.ul_current').append().html(newList);
});
});
<input type="text" id="input_listName"/>
<br/>
<button type="submit" class="btn_sendMessage" id="btn_createList">Create List</button>
<ul class="ul_current">
<li>Item</li>
<li>Item</li>
<li>Item</li>
</ul>
$('#btn_createList').click(function(){
$('.ul_current').append($('<li>', {
text: $('#input_listName').val()
}));
});
should do it.
Demo: http://www.jsfiddle.net/G8pbG/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With