Scrolling with Highlight

Developer
Size
2,430 Kb
Views
28,336

How do I make an scrolling with highlight?

Scrolling on the page using an anchor and then highlight the part where the anchor points.. What is a scrolling with highlight? How do you make a scrolling with highlight? This script and codes were developed by Alen on 07 September 2022, Wednesday.

Scrolling with Highlight Previews

Scrolling with Highlight - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Scrolling with Highlight</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html width="1200px">
<head> </head>
<body width="1200px">
<div id="button"><a href="#top">TOP</a> | <a href="#right-top">Right TOP</a> |
<a href="#middle">MIDDLE</a> | <a href="#right-middle">Right MIDDLE</a> |
<a href="#bottom">BOTTOM</a> | <a href="#right-bottom">Right BOTTOM</a></div>
<br/>
<br/>
<br/>
<br/>
<br/>
<div class="top" id="top"></div>
<div class="right-top" id="right-top"></div>
<br/>
<br/>
<br/>
<br/>
<br/>
<div id="middle" class="middle"></div>
<div id="right-middle" class="right-middle"></div>
<br/>
<br/>
<br/>
<br/>
<br/>
<div class="bottom" id="bottom"></div>
<div class="right-bottom" id="right-bottom"></div>
<br/>
<br/>
<br/>
<br/>
<br/>
</body>
</html> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Scrolling with Highlight - Script Codes CSS Codes

div#button{ position: fixed; z-index: 2; background-color: gray; padding: 5px 5px 5px 5px;
}
a{ text-decoration: none; color: white; font-size: 18px;
}
a:active{ text-decoration: none; color: red; font-size: 18px;
}
div#top{ width: 200px; height: 200px; background-color: blue; position:relative;
}
div#right-top{ width: 200px; height: 200px; background-color: green; position:relative; float: right;
}
div#right-middle{ width: 200px; height: 200px; background-color: yellow; position:relative; float: right;
}
div#middle{ width: 200px; height: 200px; background-color: green; position:relative;
}
div#bottom{ width: 200px; height: 200px; background-color: yellow; position:relative;
}
div#right-bottom{ width: 200px; height: 200px; background-color: blue; position:relative; float: right;
}

Scrolling with Highlight - Script Codes JS Codes

$(document).ready(function(){ $('a[href^="#"]').bind('click.smoothscroll',function (e) { e.preventDefault(); var target = this.hash, $target = $(target); $('html, body').stop().animate({ 'scrollTop': $target.offset().top }, 1000, 'swing', function () { window.location.hash = target; // lets add a div in the background $('<div />').css({'width':'100%','height':'100%','position':'absolute','display':'none','background':'red','top':'0', 'left':'0'}).prependTo($target).fadeIn('slow', function(){ $(this).fadeOut('slow', function(){ $(this).remove(); }); }); }); });
});
Scrolling with Highlight - Script Codes
Scrolling with Highlight - Script Codes
Home Page Home
Developer Alen
Username Alen
Uploaded September 07, 2022
Rating 3
Size 2,430 Kb
Views 28,336
Do you need developer help for Scrolling with Highlight?

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!

Alen (Alen) Script Codes
Create amazing love letters 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!