Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. <table id="entire">
  2. <tr><td>
  3. <table class="table1" border="1px">
  4. <tr>
  5. <td><img id="ebox"></td>
  6. <td><img id="fbox"></td>
  7. <td><img id="gbox"></td>
  8. </tr>
  9. </table>
  10. </td></tr>
  11. </table>
  12.  
  13. $("#entire").click(function (event) {
  14.  
  15. $('.table1 img').animate({
  16. opacity: 0.3
  17. }, 500,
  18. function() {
  19.  
  20.  
  21. }); //close the animate
  22.  
  23. $('#' + event.target.id).animate({
  24. opacity: 0.9
  25. }, 500,
  26. function() {
  27.  
  28.  
  29. }); //close the animate
  30.  
  31. }); //close the event click
  32.  
  33. $('.table1 img').not(event.target).animate({alpha: 0.3}, {
  34. duration: 1000,
  35. step: function() {
  36. $('.table1').css('border-color','rgba(0,0,0,'+this.alpha+')');
  37. }
  38.  
  39. });
  40.  
  41. var $t = $("#entire table").on('click', 'img', function() {
  42. $(this).fadeIn(250);
  43. $t.animate('border-color', '#FFF').find('img').not(this).fadeOut(1000);
  44. });
  45.  
  46. var $t = $("#entire table").on('click', 'img', function() {
  47. $(this).fadeTo(250, 1.0);
  48. $t.animate('border-color', '#FFF').find('img').not(this).fadeTo(1000, 0.2);
  49. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement