' + '

' + truck.truck_name + '

' + '

' + start.format("dddd, MMM Do, h:mm a") + " to " + end.format("h:mm a") + '

' + '

'; }); $("#rows").html(rowString); if(activeTrucks.length == 0) $("#rows").html('

No active trucks

'); $(".truck_row").click(function(){ var index = $(this).index()/2; var truck = activeTrucks[index]; $(".truck_row").removeClass("active"); $(this).addClass("active"); $.each(infoWindows, function(i, v){v.close();}); console.log(markers[index]) infoWindows[index].open(map,markers[index]); map.setCenter(new google.maps.LatLng(truck.lat, truck.lng)); map.setZoom(12); }); }, 500); } $(function(){ $("#opening_later, #open_now").click(function(){$(this).toggleClass("active"); populateMapAndList();}) populateMapAndList(); $('.menu').dropit({ action: 'mouseenter' }); });

OPEN NOW

OPENING LATER