我有以下的javascript。代码的可拖动部分可以工作,但由于某种原因警报不起作用。有关如何修复它以获取警报的任何建议吗?
<script src="http://twitter.github.io/bootstrap/assets/js/jquery.js"></script>
<%= javascript_include_tag "application" %>
<%= javascript_include_tag "jsapi" %>
<%= javascript_include_tag "jquery-1.3.2.min" %>
<%= javascript_include_tag "jquery-ui-1.7.1.custom.min" %>
<script type="text/javascript">
// When the document is ready set up our sortable with it's inherant function(s)
$(document).ready(function() {
$("#test-list").sortable({
handle : '.handle',
update : function () {
var order = $('#test-list').sortable('serialize');
}
});
});
</script>
<script>
$(function(){
$('#test1').on('click',function(){
alert('test');
// CONCATENATE TEXT
// user = $('.user:nth-child(1)').text()+ ','+ $('.user:nth-child(2)').text();
// alert(user);
// $('#personalassessment_set3').val(user);
});
});
<input id="test1" type="button" value="Set Value" />