Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip don't respect dynamically changed title attribute #14769

Closed
valllabh opened this issue Oct 10, 2014 · 9 comments
Closed

Tooltip don't respect dynamically changed title attribute #14769

valllabh opened this issue Oct 10, 2014 · 9 comments

Comments

@valllabh
Copy link

Tooltip don't respect dynamically changed title attribute.

@valllabh
Copy link
Author

Tooltip.prototype.getTitle() should check if title is not blank and differs from data-original-title and should call Tooltip.prototype.fixTitle() accordingly.

@hnrch02
Copy link
Collaborator

hnrch02 commented Oct 10, 2014

So why not just update the data-original-title directly?

@valllabh
Copy link
Author

@hnrch02 If some other third party plugin is updating title attribute we can't force them to use the data-original-title

@hnrch02
Copy link
Collaborator

hnrch02 commented Oct 11, 2014

I see. I'll leave this for @fat to decide.

@peterblazejewicz
Copy link
Contributor

One could just use dynamic title option already available in such scenarios I think:

$btn.tooltip({
  title: function(){
    return $(this).attr('title');
  }
});

@bitcity
Copy link

bitcity commented Jan 15, 2015

Similar issue here. The dynamic title option doesn't update the tooltip content either.

@Isaac-Kleinman
Copy link

I believe the dynamic title option is not working due to this issue: #15359; the value of the title attribute gets removed and added to the original-title attribute.

@mdo
Copy link
Member

mdo commented Mar 27, 2015

Closing as a dupe bug report of #15359.

@mdo mdo closed this as completed Mar 27, 2015
@BDhara
Copy link

BDhara commented Apr 8, 2015

try this
$('a[rel="tooltip"]').tooltip({
placement: 'right',
animated: 'fade'
}).attr('data-original-title', 'Dimension:' + data[n].Dimension );
for bootstrap tooltip

@twbs twbs locked and limited conversation to collaborators Apr 23, 2015
rueckstiess added a commit to mongodb-js/compass that referenced this issue Jul 9, 2015
need to set `title` and `data-original-title` due to bug in bootstrap's tooltip.

@see twbs/bootstrap#14769
rueckstiess added a commit to mongodb-js/compass that referenced this issue Jul 9, 2015
need to set `title` and `data-original-title` due to bug in bootstrap's tooltip.

@see twbs/bootstrap#14769
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants