oops - it is getJSON, not get

This commit is contained in:
sanj 2010-10-26 02:42:11 +02:00
parent 3656e9e281
commit 3c0e9b02c0

View File

@ -91,15 +91,15 @@ $(function() {
$('.event').click(function(e) {
// e.stopPropagation();
var eventId = $(this).data('id');
$.get("eventMedia", {'id': eventId}, function(data) {
console.log(data);
$.getJSON("eventMedia", {'id': eventId}, function(data) {
// console.log(data);
displayMedia(data);
});
});
});
function displayMedia(data) {
// console.log(data);
// console.log("data", data['images']);
var imagesHtml = tmpl("tmpl_images", {'images': data.images });
var youtubeHtml = tmpl("tmpl_youtubes", {'videos': data.yvideos });
var padmaHtml = tmpl("tmpl_padmas", {'videos': data.pvideos });
@ -110,8 +110,8 @@ function displayMedia(data) {
function onFeatureSelect(f) {
var id = f.feature.attributes.id;
$.get("locationMedia", {'id': f.feature.attributes.id }, function(data) {
console.log(data);
$.getJSON("locationMedia", {'id': f.feature.attributes.id }, function(data) {
displayMedia(data);
});
// $('img').removeClass('mapSelect');
// $('[data-id=' + id + ']').addClass("mapSelect");