Lastik menu

2,257 Kb

How do I make an lastik menu?

Simple lava-lamp like horizontal menu, using Tweenmax . What is a lastik menu? How do you make a lastik menu? This script and codes were developed by Chrysto on 16 July 2022, Saturday.

Lastik menu Previews

Lastik menu - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Lastik menu</title> <script src="" type="text/javascript"></script> <link rel="stylesheet" href="css/style.css">
<body> <div id="menu"> <ul id="menu-list"> <li> <a href="#">Home</a></li> <li> <a href="#">Gallery</a></li> <li> <a href="#">Contacts</a></li> <li> <a href="#">Blog</a></li> </ul> <div id="menu-line"></div>
</div> <script src=''></script>
<script src=''></script> <script src="js/index.js"></script>

Lastik menu - Script Codes CSS Codes

html, body, div {	margin: 0;	padding: 0;	font-family: "Helvetica Neue", Helvetica, sans-serif;
#menu{ position: relative; text-align: center;	margin: 100px;
#menu-line{	display: block;	position: absolute; left: 50%; top: 25px;	width: 0;	height: 5px;	background-color: black;
ul{	z-index: 100;
ul li {	display: inline-block;	margin-right: 30px;
ul li a{	display: block;	font-size: 20px;	text-transform: uppercase; text-decoration: none;	color: black;

Lastik menu - Script Codes JS Codes

$(function(){	var currentIndex = 0;	var _offset = 10;	var $menuLi = $("#menu-list li");	var $line = $("#menu-line");	$menuLi.on("click", function(){	var _$this = $(this);	TweenMax.killTweensOf($line);	if( _$this.index() > currentIndex ){$line, 0.5, {css: {width: (_$this.position().left + _$this.outerWidth()) - $line.position().left + _offset/2 }, onComplete:function(){	currentIndex = _$this.index();$line, 0.5, { css:{ left : _$this.position().left - _offset/2, width: _$this.outerWidth() + _offset } })	} });	} else {$line, 0.5, {css: { left: _$this.position().left - _offset/2, width: ($line.position().left + $line.outerWidth()) - _$this.position().left + _offset/2 }, onComplete:function(){	currentIndex = _$this.index();$line, 0.5, { css:{ width: _$this.outerWidth() + _offset } })	} });	}	});	});
Lastik menu - Script Codes
Lastik menu - Script Codes
Home Page Home
Developer Chrysto
Username bassta
Uploaded July 16, 2022
Rating 4
Size 2,257 Kb
Views 40,480
Do you need developer help for Lastik menu?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Chrysto (bassta) Script Codes
Create amazing SEO content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!