oops - it is getJSON, not get
This commit is contained in:
parent
3656e9e281
commit
3c0e9b02c0
|
@ -91,15 +91,15 @@ $(function() {
|
||||||
$('.event').click(function(e) {
|
$('.event').click(function(e) {
|
||||||
// e.stopPropagation();
|
// e.stopPropagation();
|
||||||
var eventId = $(this).data('id');
|
var eventId = $(this).data('id');
|
||||||
$.get("eventMedia", {'id': eventId}, function(data) {
|
$.getJSON("eventMedia", {'id': eventId}, function(data) {
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
displayMedia(data);
|
displayMedia(data);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function displayMedia(data) {
|
function displayMedia(data) {
|
||||||
// console.log(data);
|
// console.log("data", data['images']);
|
||||||
var imagesHtml = tmpl("tmpl_images", {'images': data.images });
|
var imagesHtml = tmpl("tmpl_images", {'images': data.images });
|
||||||
var youtubeHtml = tmpl("tmpl_youtubes", {'videos': data.yvideos });
|
var youtubeHtml = tmpl("tmpl_youtubes", {'videos': data.yvideos });
|
||||||
var padmaHtml = tmpl("tmpl_padmas", {'videos': data.pvideos });
|
var padmaHtml = tmpl("tmpl_padmas", {'videos': data.pvideos });
|
||||||
|
@ -110,8 +110,8 @@ function displayMedia(data) {
|
||||||
|
|
||||||
function onFeatureSelect(f) {
|
function onFeatureSelect(f) {
|
||||||
var id = f.feature.attributes.id;
|
var id = f.feature.attributes.id;
|
||||||
$.get("locationMedia", {'id': f.feature.attributes.id }, function(data) {
|
$.getJSON("locationMedia", {'id': f.feature.attributes.id }, function(data) {
|
||||||
console.log(data);
|
displayMedia(data);
|
||||||
});
|
});
|
||||||
// $('img').removeClass('mapSelect');
|
// $('img').removeClass('mapSelect');
|
||||||
// $('[data-id=' + id + ']').addClass("mapSelect");
|
// $('[data-id=' + id + ']').addClass("mapSelect");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user