site.js 575 B

123456789101112131415161718192021222324252627282930
  1. function hover() {
  2. var $work = $('.navbar > ul > li:nth-child(1)');
  3. $work.hover(
  4. function() {
  5. $( this ).addClass( "hover" );
  6. $(this).parents().find('.tags').addClass("visible");
  7. }, function() {
  8. $( this ).removeClass( "hover" );
  9. $(this).parents().find('.tags').removeClass("visible");
  10. }
  11. );
  12. }
  13. function active() {
  14. var $work = $('.navbar > ul > li:nth-child(1)');
  15. $work.click(function(event) {
  16. $(this).parents().find('.tags').toggleClass("active");
  17. });
  18. }
  19. jQuery(document).ready(function($) {
  20. active();
  21. hover();
  22. });