I have the below javascript. The draggable portion of the code works, but the alert for some reason isn't working. Any advice on how to fix it to get the alert to display?
<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" />