나는이 HTML 마크 업이 있습니다jQuery를, 앞에 추가 데이터는
<div id="destination">
</div>
<input id="test" type="text" />
<button id="clicker">Click me</button>
과 경고 텍스트가 필드에 inputed 텍스트가 참으로
$(document).on('click', '#clicker', function(event){
var newCat = $('#test').val();
$(newCat).prepend("#destination");
alert(newCat);
});
이 jQuery를-조각을하지만, 텍스트가 #destination
div에 있지 않습니다. http://jsfiddle.net/FaAY4/
가 왜 이벤트가'document'에 위임된다? –