问题
I've two popover, one to show the login form and other to show after the user has logged in. I want a big popover with login form and a small one after login. So I'm adding a class when the popover is initialized. But it is giving an error and preventing all other ajax functions in the page not to work.
I'm using the latest bootstrap, and jquery. I'm using bootstrap 3.3.4 version.
Here is my code, please have a look.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
$('[data-popover-content="#logoutPopover"]').popover({
placement: 'bottom',
container: 'body',
html: true,
content: function () {
var clone = $($(this).data('popover-content')).clone(true).removeClass('hide');
return clone;
}
})
.data('show.bs.popover')
.tip()
.addClass('user-profile-popover-dropdown');
来源:https://stackoverflow.com/questions/38495436/typeerror-popover-data-is-undefined