bugfix js
This commit is contained in:
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+43
-35
@@ -1,39 +1,30 @@
|
||||
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() {
|
||||
// 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.click(function(event) {
|
||||
// $(this).parents().find('.tags').toggleClass("active");
|
||||
// });
|
||||
// $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 catprojets() {
|
||||
|
||||
$(window).load(function () {
|
||||
var $content = $('.content');
|
||||
var $txt = $('#items .content .txt');
|
||||
@@ -47,12 +38,29 @@ function catprojets() {
|
||||
"height" : $Htxt + "px"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function removeAct(){
|
||||
var $cat = $('.navbar > ul.tags');
|
||||
var $work = $('.navbar > ul:first-child > li:first-child a');
|
||||
var $start = $("body #start");
|
||||
|
||||
$work.click(function(event) {
|
||||
event.preventDefault();
|
||||
$(this).parents('.navbar').find('.tags').toggleClass('visible');
|
||||
$(this).parents('.navbar').find(' ul > li:first-child').toggleClass('hover');
|
||||
});
|
||||
|
||||
$start.click(function(event) {
|
||||
$(this).parents('#top').find('.tags').removeClass('visible');
|
||||
$(this).parents('#top').find(' ul > li:first-child').removeClass('hover');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
// active();
|
||||
hovercat();
|
||||
catprojets();
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
removeAct();
|
||||
// hovercat();
|
||||
catprojets();
|
||||
});
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
margin: auto 0;
|
||||
& > .tags{
|
||||
& > a {
|
||||
height: 30px!important;
|
||||
li{
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
@@ -59,9 +60,9 @@
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin-right: 35px;
|
||||
margin-right: 35px!important;
|
||||
& > a{
|
||||
pointer-events: none;
|
||||
// pointer-events: none;
|
||||
}
|
||||
&:after{
|
||||
content: " ";
|
||||
@@ -100,7 +101,7 @@
|
||||
justify-content: flex-end;
|
||||
li{
|
||||
height: 40px;
|
||||
margin-right: 20px;
|
||||
margin-right: 20px!important;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
@@ -133,7 +134,7 @@
|
||||
height: 40px;
|
||||
padding: 0 20px;
|
||||
&:first-child{
|
||||
margin-top: 10px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
&:last-child{
|
||||
margin-bottom: 10px;
|
||||
|
||||
Reference in New Issue
Block a user