Setting Menu Simple With JS
How do I make an setting menu simple with js?
What is a setting menu simple with js? How do you make a setting menu simple with js? This script and codes were developed by Nguyễn Vũ on 02 September 2022, Friday.
Setting Menu Simple With JS - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Setting Menu Simple With JS</title> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <head> <link href="https://fonts.googleapis.com/css?family=Montserrat:600,400" rel="stylesheet"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" />
</head>
<section class="main-content"> <div class="container"> <div class="row"> <div class="col-md-6"> <div class="overlay-left overlay-left--background-color"></div> <div class="post post--lg"> <a href="#" class="post__category post__category--font-size-color-red">foods</a> <div class="post__title post__title--font-size-big"> <h2> <a href="#">The bedding was hardly able to cover it andseemed ready to slide anyal</a> </h2> </div> <div class="post__meta"> <i class="fa fa-clock-o" aria-hidden="true"></i> <a href="#" >2 hours ago</a> <i class="fa fa-commenting-o" aria-hidden="true"></i> <a href="#" >128 comments</a> </div> </div><!-- /post --> </div><!--/row --> <div class="col-md-6"> <div class="overlay-right overlay-right--background-color"></div> <div class="post post--md"> <a href="#" class="post__category post__category--font-size-color-green">sport</a> <div class="post__title post__title--font-size-small"> <h2> <a href="#">Tortor ac vehicula at pulvinar eros ad music nisi torquent aliquet senectus varius</a> </h2> </div> <div class="post__meta"> <i class="fa fa-clock-o" aria-hidden="true"></i> <a href="#" >2 hours ago</a> <i class="fa fa-commenting-o" aria-hidden="true"></i> <a href="#" >128 comments</a> </div> </div><!-- /post --> <div class="post post--md"> <a href="#" class="post__category post__category--font-size-color-blue">Natures</a> <div class="post__title post__title--font-size-small"> <h2> <a href="#">A wonderful serenity has taken possession of my entire soul, like these</a> </h2> </div> <div class="post__meta"> <i class="fa fa-clock-o" aria-hidden="true"></i> <a href="#" >2 hours ago</a> <i class="fa fa-commenting-o" aria-hidden="true"></i> <a href="#" >128 comments</a> </div> </div><!-- /post --> <div class="post post--md"> <a href="#" class="post__category post__category--font-size-color-gray">Holiday</a> <div class="post__title post__title--font-size-small"> <h2> <a href="#">When, while the lovely valley teems around me, and the meridian sun</a> </h2> </div> <div class="post__meta"> <i class="fa fa-clock-o" aria-hidden="true"></i> <a href="#" >2 hours ago</a> <i class="fa fa-commenting-o" aria-hidden="true"></i> <a href="#" >128 comments</a> </div> </div><!--/post--> </div> </div><!--/container --> </div>
</section>
<div class="setting"> <div class="overlay-setting"> <h2>Overlay Background Left Color:</h2> <input type="color" name="overlay-color" id="overlayLeftBgColor" value="#eeeeee" /> <h2>Overlay Background Right Color:</h2> <input type="color" name="overlay-color" id="overlayRightBgColor" value="#ffffff" /> <h2>Overlay Background Left Image</h2> <input type="text" name="overlay-image" id="overlayLeftBgImage" placeholder="Url Image BackGround" value="" /> <h2>Overlay Background Right Image</h2> <input type="text" name="overlay-image" id="overlayRightBgImage" placeholder="Url Image BackGround" value="" /> <a href="#"><button id="reset" class="btn">RESET TO DEFAULT</button></a> <h1>SETTING !</h1> </div>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Setting Menu Simple With JS - Script Codes CSS Codes
* { font-family: "Montserrat";
}
* a:hover { text-decoration: none;
}
.main-content { position: relative; overflow: hidden;
}
.main-content .overlay-right, .main-content .overlay-left { height: 100%; width: 200%; position: absolute; z-index: -1;
}
.main-content .overlay-right--background-color { background-color: transparent;
}
.main-content .overlay-right--background-image { background-image: url(""); background-repeat: no-repeat; background-size: cover;
}
.main-content .overlay-left { right: 0;
}
.main-content .overlay-left--background-color { background-color: #eee;
}
.main-content .overlay-left--background-image { background-image: url(""); background-repeat: no-repeat; background-size: cover;
}
.post--lg { text-align: center; padding: 30% 10%;
}
.post--lg .post__title { margin-bottom: 50px;
}
.post--lg .post__category { font-size: 20px;
}
.post--md { padding: 5% 0% 5% 15%;
}
.post__category { text-transform: uppercase; font-size: 12px; margin-bottom: 20px; display: block;
}
.post__category--font-size-color-red { color: red;
}
.post__category--font-size-color-green { color: green;
}
.post__category--font-size-color-blue { color: blue;
}
.post__category--font-size-color-gray { color: gray;
}
.post__title { margin-bottom: 10px;
}
.post__title a { color: #1c1c1c;
}
.post__title--font-size-big h2 { font-size: 30px; font-weight: 600;
}
.post__title--font-size-small h2 { font-size: 20px; font-weight: bold;
}
.setting { width: 450px; background-color: rgba(0, 0, 0, 0.7); padding: 20px; position: fixed; top: 10%; left: 0; transform: translate(-90%); transition: all 1s;
}
.setting:hover { transform: translate(0);
}
.setting h1 { font-weight: bold; color: #fff; position: absolute; right: -15%; top: 40%; transform: rotate(90deg);
}
.setting h2 { color: #fff; font-size: 16px; font-weight: bold; margin: 5px 0;
}
.setting input[type="color"] { width: 90%; height: 30px; margin: 10px 0px;
}
.setting input[type="text"] { width: 90%; height: 40px; margin: 10px 0px; padding-left: 20px;
}
.setting .btn:hover { cursor: pointer;
}
Setting Menu Simple With JS - Script Codes JS Codes
$(document).ready(function(){ setInterval(function(){ // Get value Setting Menu var overlayLeftBgColor = $('#overlayLeftBgColor').val(); var overlayRightBgColor = $('#overlayRightBgColor').val(); var overlayLeftBgImage = $("#overlayLeftBgImage").val(); var overlayRightBgImage = $('#overlayRightBgImage').val(); // Change OverLay Background if($('#overlayLeftBgImage').val().length >= 10){ // Remove Background color and Add Backgroud Image $(".overlay-left").removeAttr("style"); $('.overlay-left').removeClass('overlay-left--background-color'); $('.overlay-left').addClass('overlay-left--background-image'); // Update Background Image $('.overlay-left--background-image').css('background-image', 'url(' + overlayLeftBgImage + ')'); } else { $('.overlay-left').addClass('overlay-left--background-color'); $('.overlay-left--background-color').css('backgroundColor',overlayLeftBgColor); $('.overlay-left').removeClass('overlay-left--background-image'); } if($('#overlayRightBgImage').val().length >= 10){ $(".overlay-right").removeAttr("style"); $('.overlay-right').removeClass('overlay-right--background-color'); $('.overlay-right').addClass('overlay-right--background-image'); $('.overlay-right--background-image').css('background-image', 'url(' + overlayRightBgImage + ')'); } else { $('.overlay-right').addClass('overlay-right--background-color'); $('.overlay-right--background-color').css('backgroundColor',overlayRightBgColor); $('.overlay-right').removeClass('overlay-right--background-image'); } $("#reset").click(function(){ $("#overlayLeftBgColor").val('#eeeeee'); $("#overlayRightBgColor").val('#ffffff'); $("#overlayLeftBgImage").val(''); $("#overlayRightBgImage").val(''); $(".overlay-right").removeAttr("style"); $(".overlay-left").removeAttr("style"); }); },500);
});
Developer | Nguyễn Vũ |
Username | nguyenvu94 |
Uploaded | September 02, 2022 |
Rating | 3 |
Size | 4,413 Kb |
Views | 20,240 |
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!
Name | Size |
Wow JS | 1,709 Kb |
Equal column in BootStrap | 1,700 Kb |
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!
Name | Username | Size |
Exploding Text | Jjmartucci | 4,749 Kb |
RSW | JordanC | 3,726 Kb |
Ionic Infinite outside ion-content with ion-pane | Felquis | 3,117 Kb |
APortfolio | Skybutterfly | 5,174 Kb |
Responsive Advert | James_zedd | 2,354 Kb |
Drag and Drop Quiz | Cgspicer | 3,837 Kb |
React Template | Isac | 1,241 Kb |
LeMandinque | Aadesida | 9,046 Kb |
Mobile first social buttons with no iframe | Alistairtweedie | 3,158 Kb |
Sticky Navbar | Phantomesse | 5,106 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!