public/js/application.js
// Piece together HTML to display the information
Piece together HTML to display the information
Piece together HTML to display the information
function displayRecs(recommendations) {
		var html = "<div class='row'>"
		$.each(recommendations, function() {
			concert = this;
			html+= "<div class='col-sm-6'><div class='card card-block'>";
			html+="<h3 class='card-title'>"+concert.event.title+"</h3><p class='card-text'>"+concert.event.datetime_local+"</p>";
			html+="<a href="+concert.event.url+" class='btn btn-primary'>Get Tickets</a></div></div>"
		});
		html+="</div>"
		$('#upcoming_results').append(html);
	}
function displayRecs ( recommendations ) { var html = "<div class='row'>" $ . each ( recommendations , function ( ) { concert = this ; html += "<div class='col-sm-6'><div class='card card-block'>" ; html += "<h3 class='card-title'>" + concert . event . title + "</h3><p class='card-text'>" + concert . event . datetime_local + "</p>" ; html += "<a href=" + concert . event . url + " class='btn btn-primary'>Get Tickets</a></div></div>" } ) ; html += "</div>" $ ( '#upcoming_results' ) . append ( html ) ; }
Piece together HTML to display the information
Piece together HTML to display the information
// html+="<button class='btn btn-primary' id='"+concert.event.id+"'>Interested!</button></div></div>"