Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. $(document).ready(function () {
  2.  
  3. var tags = $(".portfolio__lcolumn__category > li > a");
  4.  
  5. tags.click(function (e) {
  6. var tag = $(this).text();
  7.  
  8. if (!$(this).hasClass("active")) {
  9. tags.removeClass("active");
  10. $(this).addClass("active");
  11. }
  12.  
  13. tag = "#" + tag.replace(" ", "-").toLowerCase();
  14. $(".portfolio__rcolumn__box > li").hide();
  15.  
  16. if (tag == "#all") {
  17. $(".portfolio__rcolumn__box > li").show();
  18. } else {
  19. $(".portfolio__rcolumn__box > li:contains(" + tag + ")").show();
  20. }
  21.  
  22. e.preventDefault();
  23.  
  24. });
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement