Change Twitter Bootstrap Tooltip content on click

前端 未结 25 1289
情深已故
情深已故 2020-11-27 10:02

I have a tooltip on an anchor element, that sends an AJAX request on click. This element has a tooltip (from Twitter Bootstrap). I want the tooltip content to change when th

25条回答
  •  萌比男神i
    2020-11-27 10:19

    you can update the tooltip text without actually calling show/hide:

    $(myEl)
        .attr('title', newTitle)
        .tooltip('fixTitle')
        .tooltip('setContent')
    

提交回复
热议问题