Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
101 views
in Technique[技术] by (71.8m points)

javascript - Get bootstrap tooltip content after creation

I am creating a bootstrap tooltip using $(el).tooltip(config). This tooltip is getting fetched by AJAX and is different for each element.

Is there any way I can get the tooltip content after it has been created?

For example:

$(el).on('click', _ => {
const tooltipContent = null; // get tooltip content here
// do something with it...
});

On my second listener, it is 100% sure that the tooltip has been created already, so it has to be saved somewhere. I just don't know where.

I've tried to use bootstraps internal getTitle method with $(el).tooltip('getTitle') but that doesn't seem to work.

Any idea?

question from:https://stackoverflow.com/questions/65883112/get-bootstrap-tooltip-content-after-creation

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...