12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- function hovercat() {
- var $work = $('.navbar > ul > li:nth-child(1)');
- var $workafter = $('.navbar > ul > li:nth-child(1)::after');
- var $cat = $('.navbar > ul.tags');
- $work.hover(
- function() {
- $( this ).addClass( "hover" );
- $(this).parents().find('.tags').addClass("visible");
- }, function() {
- $( this ).removeClass( "hover" );
- $(this).parents().find('.tags').removeClass("visible");
- }
- );
- $cat.hover(
- function() {
- $( this ).addClass( "visible" );
- $(this).parents().find($work).addClass('hover');
- }, function() {
- $( this ).removeClass( "visible" );
- $(this).parents().find($work).removeClass('hover');
- }
- );
- }
- function active() {
- var $work = $('.navbar > ul > li:nth-child(1)');
- $work.click(function(event) {
- $(this).parents().find('.tags').toggleClass("active");
- });
- }
- function catprojets() {
- $(window).load(function () {
- var $content = $('.content');
- var $txt = $('#items .content .txt');
- var $cat = $('#items .content .taxonomy');
- var $Hcontent = $content.outerHeight();
- var $Hcat = $cat.outerHeight();
- var $Htxt = $Hcontent - $Hcat;
- $txt.css({
- "height" : $Htxt + "px"
- });
- });
- }
- jQuery(document).ready(function($) {
- active();
- hovercat();
- catprojets();
- });
|