Guest User

Untitled

a guest
Jan 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. function createlabel(){
  2. var selectedColor;
  3. $('.colors > .fa-check').each(function(){
  4. if($(this).is(":visible")){
  5. selectedColor = $(this).closest('.colors').attr('id');
  6. }
  7. });
  8. $(".labellists").hide();
  9. console.log(selectedColor);
  10. switch(selectedColor)
  11. {
  12. case "green":
  13. $("#greenlist, #greenlist > .fa").show();
  14. break;
  15. case "yellow":
  16. $("#yellowlist, #yellowlist > .fa").show();
  17. break;
  18. }
  19. }
Add Comment
Please, Sign In to add comment