diff options
author | Thong Kuah <kuahyeow@gmail.com> | 2012-06-04 13:00:24 +1200 |
---|---|---|
committer | Thong Kuah <kuahyeow@gmail.com> | 2012-06-04 13:00:24 +1200 |
commit | 48c94321dfbd25613b422dd10c35213db3fdb954 (patch) | |
tree | 39cbb369efe80e6130f0c8f667c9f152d727f65b | |
parent | ac11fd280fe8e188920c6a31a940c1867d32dcd5 (diff) | |
download | jquery-week-calendar-48c94321dfbd25613b422dd10c35213db3fdb954.zip jquery-week-calendar-48c94321dfbd25613b422dd10c35213db3fdb954.tar.gz jquery-week-calendar-48c94321dfbd25613b422dd10c35213db3fdb954.tar.bz2 |
Fix bug where "this" should refer to the element in iteration
Instead of using $.map where this refers to the window,
we use $(elements).map, which will map this to the
element that we want
-rw-r--r-- | jquery.weekcalendar.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jquery.weekcalendar.js b/jquery.weekcalendar.js index 3f77af0..e406057 100644 --- a/jquery.weekcalendar.js +++ b/jquery.weekcalendar.js @@ -531,7 +531,7 @@ // events array locally in a store but this should be done in conjunction // with a proper binding model. - var currentEvents = $.map(self.element.find('.wc-cal-event'), function() { + var currentEvents = self.element.find('.wc-cal-event').map(function() { return $(this).data('calEvent'); }); |