Skip to content

Commit

Permalink
offsetX, offsetY options
Browse files Browse the repository at this point in the history
  • Loading branch information
cgst committed Mar 12, 2011
1 parent d789526 commit 3c59a38
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
$.fn.popover = function(options) {
var defaults = {
openEvent: null,
closeEvent: null
closeEvent: null,
offsetX: 0,
offsetY: 0
}
var options = $.extend(defaults, options);

Expand Down Expand Up @@ -79,8 +81,8 @@ $.fn.popover = function(options) {
triangle.css("left", contentWidth/2 - triangleSize + diffWidth);

floater.offset({
top: topOff,
left: leftOff - diffWidth
top: topOff + options.offsetY,
left: leftOff - diffWidth + options.offsetX
});
floater.show();
//Timeout for webkit transitions to take effect
Expand Down

0 comments on commit 3c59a38

Please sign in to comment.