{"size": 584, "ext": "js", "max_stars_repo_path": "public/js/application.js", "max_stars_repo_name": "mattymcd/Factory-Finder", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/js/application.js", "max_issues_repo_name": "mattymcd/Factory-Finder", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/js/application.js", "max_forks_repo_name": "mattymcd/Factory-Finder", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 29.2, "max_line_length": 167, "alphanum_fraction": 0.5547945205}
$(document).ready(function() {

	$(".login-button").click(function(){
		$(".box").modal();
	});

	$(".search-button").click(function(evt){
		evt.preventDefault();
		$(".search-results").empty();
		$.ajax({type: "post", url: '/query', data: { query: $(".search-box").val()}, dataType: "JSON"} )
		.done(function(response){
			for (i = 0; i < response.length; i++) {
				// console.log(response)
			$(".search-results").append("<tr><td>"+response[i].date+"</td> <td>"+response[i].shipper+"</td> <td>"+response[i].item+"</td> <td>"+response[i].weight+"</td></tr>")
			};
		});
	});

});
