Working on a simple calendar script, trying to make it possible for events to be posted to the proper day; however the jQuery $.extend is not extending my options object. Here is the snippet from the HTML file:
$("#cal").calendar({
month: 2,
events: [{
date: "2013-4-10",
workorder: 1234567890,
district: 01,
range: "2:00pm - 4:00pm",
appNotes: "This is just a sample of some notes... end",
installer: "John Doe",
cityNotes: "This is just another sample of some notes... end"
}, {
date: "2013-4-1",
workorder: 1234567890,
district: 01,
range: "3:00pm - 5:00pm",
appNotes: "This is just a sample of some notes... end",
installer: "John Doe",
cityNotes: "This is just another sample of some notes... end"
}]
});
And the beginning of my plug in:
(function($){
$.fn.calendar = function(options){
var defaults= {
month: null,
prev: "prevMonth",
curr: "currMonth",
next: "nextMonth",
events: []
}, options = $.extend(defaults, options);
return($(this).each(function(){
var obj = $(this),
// Etc...
I'm able to access properties of the object, however it is not being extended as thought. Any ideas?