nohros / nsPopover

Popover dialogs for angularjs applications.
MIT License
126 stars 107 forks source link

The ns-popover-container feature does not work properly #30

Closed Thomeeque closed 10 years ago

Thomeeque commented 10 years ago

Hi! The ns-popover-container feature does not work properly, in

var $container = $document[0].querySelector(options.container);

you get bare DOM element, not jQuery object, therefor either the

$container.append($popover);

fails (for elements having length property, e.g. form) or container (for elements not having length property) gets replaced by body:

if (!$container.length) {
    $container = $document.find('body');
}

$container should be filled e.g. by:

var $container = $document.find(options.container);

Cheers, Tomas