Twitter bootstrap does not have this feature built in, but you could add your own functions to do this, like so:
$('#photo1').hover(function() {$('.tooltip').addClass('tooltipPhoto')}, function () {$('.tooltip').removeClass('tooltipPhoto')});?
and then you just have to define tooltipPhoto
class in CSS to have a different background color.
EDIT:
Updated solution:
function changeTooltipColorTo(color) {
$('.tooltip-inner').css('background-color', color)
$('.tooltip.top .tooltip-arrow').css('border-top-color', color);
$('.tooltip.right .tooltip-arrow').css('border-right-color', color);
$('.tooltip.left .tooltip-arrow').css('border-left-color', color);
$('.tooltip.bottom .tooltip-arrow').css('border-bottom-color', color);
}
$(document).ready(function () {
$("[rel=tooltip]").tooltip();
$('#photo1').hover(function() {changeTooltipColorTo('#f00')});
$('#photo2').hover(function() {changeTooltipColorTo('#0f0')});
$('#photo3').hover(function() {changeTooltipColorTo('#00f')});
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…