daily pastebin goal
36%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div id="users" class="row">
  2.     <div id="photo_stack" class="span6 photo_stack">
  3.         <img id="photo1" src="" width="400px" height="300px" alt="" rel="tooltip" data-placement="right" title="Other Color" />
  4.    
  5. #users .tooltip { background-color: #somecolor; }
  6.    
  7. $('#photo1').hover(function() {$('.tooltip').addClass('tooltipPhoto')}, function () {$('.tooltip').removeClass('tooltipPhoto')});​
  8.    
  9. function changeTooltipColorTo(color) {
  10.     $('.tooltip-inner').css('background-color', color)
  11.     $('.tooltip.top .tooltip-arrow').css('border-top-color', color);
  12.     $('.tooltip.right .tooltip-arrow').css('border-right-color', color);
  13.     $('.tooltip.left .tooltip-arrow').css('border-left-color', color);
  14.     $('.tooltip.bottom .tooltip-arrow').css('border-bottom-color', color);
  15. }
  16.  
  17. $(document).ready(function () {
  18.     $("[rel=tooltip]").tooltip();
  19.     $('#photo1').hover(function() {changeTooltipColorTo('#f00')});
  20.     $('#photo2').hover(function() {changeTooltipColorTo('#0f0')});
  21.     $('#photo3').hover(function() {changeTooltipColorTo('#00f')});
  22. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top