Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. <div id="portSecW">
  2. <img src="X" alt="something here"></img>
  3. <img src="a" alt="something here"></img>
  4. <img src="b" alt="something here"></img>
  5. <div class="closeXbtn"><img src="g" alt="something here"></img></div>
  6. </div>
  7.  
  8. $('#portSecW img:not(".closeXbtn")').click(function(){
  9. alert($(this).attr("alt"));
  10. return false;
  11. });
  12.  
  13. $('#portSecW img').not('.closeXbtn').click(function(){
  14. alert($(this).attr("alt"));
  15. return false;
  16. });
  17.  
  18. $('#portSecW img.not(".closeXbtn")').click(function(){
  19. alert($(this).attr("alt"));
  20. return false;
  21. });
  22.  
  23. $('#portSecW a').children('img').click(function(){
  24. alert($(this).attr("alt"));
  25. return false;
  26. });
  27.  
  28. $('#portSecW img').not(".closeXbtn img").click(function(){
  29. alert($(this).attr("alt"));
  30. return false;
  31. });
  32.  
  33. $('#portSecW img:not(".closeXbtn img")').click(function(){
  34. alert($(this).attr("alt"));
  35. return false;
  36. });
  37.  
  38. $('#portSecW').children('img').click(function(){
  39. alert($(this).attr("alt"));
  40. return false;
  41. });
  42.  
  43. $('#portSecW img:not(.closeXbtn)').click(function(){
  44. alert($(this).attr("alt"));
  45. return false;
  46. });
  47.  
  48. $('#portSecW img').click(function(){
  49. if($(this).hasClass('closeXbtn'))) { /* do something */ }
  50. });
  51.  
  52. $('#portSecW img').not(".closeXbtn img").click(function(){
  53. alert($(this).attr("alt"));
  54. return false;
  55. });
  56.  
  57. $('#portSecW > img').click(function(){
  58. alert($(this).attr("alt"));
  59. return false;
  60. });
  61.  
  62. $('#portSecW > img').click(function(){
  63. alert($(this).attr("alt"));
  64. return false;
  65. });
  66.  
  67. $('#portSecW img:not(:parent(.closeXbtn))').click(function(){
  68. alert($(this).attr("alt"));
  69. return false;
  70. });
  71.  
  72. $('#portSecW img').click(function(){
  73. if($(this).hasClass('closeXbtn'))
  74. //Do some play
  75. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement