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="/js/loader.js"></script>
<meta name="keywords" content="websites website-creation ">
<meta name="keywords" content="websites website-creation custom-websites">
<meta name="description" content="">
<title>Home :: Development - janishutz.com</title>
</head>

View File

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