-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Closed
Description
Hello!
I have next code:
<a href="/foo/like" title="4 users liked this" data-requires-captcha="true">
<span class="glyphicon glyphicon-thumbs-up"></span>
Like!
<span class="badge">4</span>
</a>
// In event handler
if ($(this).data().requiresCaptcha) {
$(this).popover({title: 'Please confirm that you are human', placement: 'auto bottom'});
return false;
}
And when user clicks button with data-requires-captcha
attribute set to true (I set it up for anonymous users), I intercept click, construct popover, and placing ReCaptcha into the popover body. But text from title
attribute (obviously used for browsers' native link popover and I need it) is going to the Bootstrap popover title, and I see no way to replace it with my own (title specified in popover
method call is ignored, as written in docs).
My thoughts:
- Popover should not use standard
title
attribute, it should use something likedata-title
instead (with fallback totitle
if not present). - Popover should have some method to change title dynamically.