Advertisement
Guest User

Petelinek je cinki

a guest
Dec 17th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.52 KB | None | 0 0
  1. $("tr").click(function() {
  2.         if ($( this ).hasClass("")) {
  3.           $("tbody").on("click", "tr", function () {
  4.             $(this).css("background-color", "#FE5253");
  5.             $(this).addClass("selectedTb");
  6.           });
  7.         }
  8.       });
  9.  
  10.       $("tr").click(function() {
  11.         if ($( this ).hasClass("selectedTb")) {
  12.           $("tbody").on("click", "tr", function () {
  13.             $(this).css("background-color", "white");
  14.             $(this).removeClass("selectedTb");
  15.           });
  16.         }
  17.       });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement