Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. <div class="testing123"><img src="images/BotGrid/images/blackFull_05_03.png" /></div>
  2.  
  3.  
  4.  
  5.  
  6.  
  7. $(document).ready(function(){
  8.  
  9. $('.testing123').on('mouseover', function(){
  10. $(this).find('img').attr('src','images/BotGrid/images/yellowfull_05_03.png');
  11. $(this).css({"backgroundColor": "black"});
  12. });
  13.  
  14. $('.testing123').on('mouseleave', function(){
  15. $(this).find('img').attr('src','images/BotGrid/images/blackfull_05_03.png');
  16. $(this).css({"backgroundColor": "yellow"});
  17. });
  18.  
  19. });
  20.  
  21. <div class="bottomsquares">
  22. <img src="images/BotGrid/images/blackFull_05_03.png" class="static" name="aeffect" alt="" />
  23. <img src="images/BotGrid/images/yellowfull_05_03.png" class="rollover" name="aeffect" alt="" />
  24.  
  25. </div>
  26.  
  27.  
  28. <script>
  29. $(document).ready(function(){
  30. $(".rollover").hide();
  31. $(".bottomsquares").hover(
  32. function(){
  33. $(this).find(".static,.rollover").toggle();
  34. },
  35. function(){
  36. $(this).find(".static,.rollover").toggle();
  37. });
  38. });
  39. </script>
  40.  
  41. <script>
  42. $(".bottomsquares").hover(function() {
  43.  
  44. $(this).css('background-color', '#000000');
  45. }, function() {
  46. $(this).css('background-color', '#f9e42b');
  47. });
  48. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement