i'm using https://marketplace.sitecore.net/en/modules/symsoft_event_calendar_module.aspx sitecore , can't seem calender display. i'm getting error in firebug typeerror: $ not function script
<script type=text/javascript> $(document).ready(function ($) { $('body').fullcalendarwidget('#maincontent_0_content_0_pnlcalendar', 'http://devosinstitute.umd.edu:80/ajax/ajax.ashx?id=e7cbaa1a-c9e3-4aa9-90f8-d2e6baa41fd6&calendars=05120d6a-c8de-42c1-861a-99c9162cc9b0', 'prev,next', 'title', 'month,agendaweek,agendaday', false, '' ); }(jquery)) </script> http://placer.ca.gov/eventcalendar.aspx using same module sitecore , have compared code can't seem figure out issue.
the scoping , call of self-executing anonymous function not correct, should this:
(function($){ $(document).ready(function () { $('body').fullcalendarwidget('#maincontent_0_content_0_pnlcalendar', '/ajax/ajax.ashx?id=e7cbaa1a-c9e3-4aa9-90f8-d2e6baa41fd6&calendars=05120d6a-c8de-42c1-861a-99c9162cc9b0', 'prev,next', 'title', 'month,agendaweek,agendaday', false, '' ); } })(jquery); from comment, seems though code directly after calendar widget panel, don't need document.ready wrapper, since guaranteeing element exists. don't need request.url.host , request.url.port, can use absolute path , call current domain.
Comments
Post a Comment