1 $(document).ready(function(){
3 $('#sendMessage').validate({
12 highlight: function(element) {
14 .closest('.form-group').addClass('has-error').removeClass('has-success');
16 success: function(element) {
18 .closest('.form-group').removeClass('has-error').addClass('has-success');
22 // $('#sendMessage').validate();
24 $('#page').scroll(function(){
25 var r = $('#page')[0].scrollHeight- $('#page').height();
26 //alert($('#page').scrollTop() + " and " + r);
28 if($('#page').scrollTop() == r){
31 //alert(load + "scroll detected" + "scrollHeight and page height: " + r);
32 //$.post("try.php", {load:load}, function( data ))
33 //$('#page').append( data );
35 $.post( "try.php", {load:load}, function( data ) {
36 $( "#list" ).append( data );