Skip to content

Commit 5bc7132

Browse files
committed
change positioning of monthly popup
1 parent 70e836f commit 5bc7132

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

monthly/jquery.monthly.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
z-index: 1000;
66
box-shadow: 0 0 5px rgba(153, 153, 153, 0.2);
77
border-radius: .2em;
8+
background: #fff;
89
}
910

1011
.monthly-wrp:before {

monthly/jquery.monthly.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
},
2020

2121
_render: function() {
22-
var linkPosition = this._el.position(),
22+
var linkPosition = this._el.offset(),
2323
cssOptions = {
24-
display: 'none',
24+
display: 'none',
2525
position: 'absolute',
26-
top: linkPosition.top + this._el.height() + (options.topOffset || 0),
27-
left: linkPosition.left
26+
top: linkPosition.top + this._el.height() + (options.topOffset || 0),
27+
left: linkPosition.left
2828
};
2929
this._container = $('<div class="monthly-wrp">')
3030
.css(cssOptions)
@@ -52,7 +52,7 @@
5252
_selectMonth: function(e) {
5353
var monthIndex = $(e.target).data('value'),
5454
month = months[monthIndex],
55-
year = this._yearsSelect.val();
55+
year = this._yearsSelect.val();
5656
this._el.html(month + ' ' + year);
5757
if (options.onMonthSelect) {
5858
options.onMonthSelect(monthIndex, year);

0 commit comments

Comments
 (0)