progress on optimisation & nav

This commit is contained in:
2023-03-27 08:37:56 +02:00
parent a84f9071ec
commit fc67758087
2 changed files with 8 additions and 9 deletions

View File

@@ -10,7 +10,7 @@
<script defer="" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script defer="" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script defer src="/js/loader.js"></script> <script defer src="/js/loader.js"></script>
<meta name="keywords" content="websites website-creation "> <meta name="keywords" content="websites website-creation custom-websites">
<meta name="description" content=""> <meta name="description" content="">
<title>Home :: Development - janishutz.com</title> <title>Home :: Development - janishutz.com</title>
</head> </head>

View File

@@ -23,15 +23,14 @@
</div> </div>
</div> </div>
<script> <script>
$(document).ready(function () { $( document ).ready(function () {
console.log( window.location.pathname ); $( '.navitem' ).mouseenter( function () {
$('.navitem').mouseenter( function () {
if ( window.location.pathname.slice( 1, window.location.pathname.length - 5 ) == this.id ) {} else { if ( window.location.pathname.slice( 1, window.location.pathname.length - 5 ) == this.id ) {} else {
$(this).stop(); $( this ).stop();
$(this).animate( { 'color':'rgba(184, 214, 240, 1)' }, 200); $( this ).animate( { 'color':'rgba(184, 214, 240, 1)' }, 200);
}; };
}); } );
$('.navitem').mouseleave( function () { $( '.navitem' ).mouseleave( function () {
if ( window.location.pathname.slice( 1, window.location.pathname.length - 5 ) == this.id ) {} else { if ( window.location.pathname.slice( 1, window.location.pathname.length - 5 ) == this.id ) {} else {
$( this ).stop(); $( this ).stop();
$( this ).animate( { 'color':'black' }, 200 ); $( this ).animate( { 'color':'black' }, 200 );
@@ -51,7 +50,7 @@
} }
window.addEventListener( 'resize', function( event ) { window.addEventListener( 'resize', function( event ) {
if ( $(window).width() > 999 ) { if ( $( window ).width() > 999 ) {
$( '.nav-menu' ).slideDown(); $( '.nav-menu' ).slideDown();
previous = 1; previous = 1;
} else if ( $(window).width() < 999 && previous == 1 ) { } else if ( $(window).width() < 999 && previous == 1 ) {