Monday, 15 June 2015

jquery - Populating calendar with data from Songkick -



jquery - Populating calendar with data from Songkick -

question:

i have 2 pieces - ajax function calls/displays info songkick , function jquery calendar, both of right show separately each other.

how can populate calendar info songkick?

all code here:

http://ilyasitnikov.com/calendar/calendar.html

thank much!

you'll have alter ajax callback function populate events array pass calendar.

instead of doing:

$("#calendar").append('<li><a href="' + entry.uri+'">'+entry.displayname +'</a></li>');

you can do:

var events = array(); $.each(data["resultspage"]["results"]["event"], function(i, entry) { events.push({title: entry.displayname, start: entry.date}); });

and utilize when initializing calendar. hope helps!

jquery api

No comments:

Post a Comment