Skip to content

Instantly share code, notes, and snippets.

View bulbul84's full-sized avatar

Md Bulbul Hasan bulbul84

View GitHub Profile
@bulbul84
bulbul84 / style.css
Created July 2, 2022 17:32
custom scrollbar style
html::-webkit-scrollbar-track {
background: linear-gradient(90deg,#434343,#434343 1px,#111 0,#111);
}
html::-webkit-scrollbar-thumb {
background: #434343;
border-radius: 16px;
box-shadow: inset 2px 2px 2px hsl(0deg 0% 100% / 25%), inset -2px -2px 2px rgb(0 0 0 / 25%);
}
html::-webkit-scrollbar {
width: 16px;
@bulbul84
bulbul84 / style.css
Created June 14, 2022 15:09
Scrollbar style by css
::-webkit-scrollbar-corner {
background: rgba(0, 0, 0, 0.5);
}
* {
scrollbar-width: thin;
scrollbar-color: #c5c5c5;
}
/* Works on Chrome, Edge, and Safari */
*::-webkit-scrollbar {
width: 12px;
@bulbul84
bulbul84 / scripts.html
Created March 15, 2022 14:22
Scrolling a specific area when focus an input fields
<!-- This will scrolling desktop and mobile both -->
<script>
$(function(){
$("#filter").focus(function() {
$('html,body').animate({
scrollTop: $(".advisor_single_input").offset().top - 0},'slow');
});
$("#filter").focusout(function() {
@bulbul84
bulbul84 / scripts.js
Last active March 11, 2022 10:42
adding loading icon when submit multistep form
<script>
$(document).ready(function() {
$("#email_submit").on("click", function() {
$(".multistep_form").addClass("loading");
setTimeout(function() {
$(".multistep_form").removeClass("loading");
}, 5000);
});
});
</script>
@bulbul84
bulbul84 / index.html
Created February 22, 2022 14:34
How to change html element attribute value by jquery
<button id="dsk_humberger" class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false" aria-label="Open the menu">
<img src="<?php echo get_template_directory_uri()?>/assets/images/humberger-open.svg" alt="open menu icon" class="open_menu">
<img src="<?php echo get_template_directory_uri()?>/assets/images/humberger-close.svg" alt="close menu icon" class="close_menu">
</button>
@bulbul84
bulbul84 / index.html
Created February 22, 2022 13:54
HTML5 video custom play & pause button
<div align="center" class="embed-responsive embed-responsive-16by9">
<button class="playbutton" id="video_play"><img id="playpasue" src="custom/images/pause.png"></button>
<video id="herovideo" class="embed-responsive-item" width="560" height="315" autoplay loop muted>
<source src="custom/videos/Hero-Video-v8.mp4" type="video/mp4" />
<source src="custom/videos/Hero-Video-v8.mp4" type="video/mov" />
<source src="custom/videos/Hero-Video-v8.mp4" type="video/ogg" /> Your browser does not support the video tag.
</video>
</div>
@bulbul84
bulbul84 / index.html
Created December 16, 2021 12:25
Input keyboard only focus / input focus outline should be keyboard tab only on in mouse click/ focus
<div>
Use the <em>TAB</em> key to move focus around.<br>
<span class="bad-focus">Mouse Focus</span>
<span class="good-focus">Tab Focus</span>
</div>
<button>Button A</button>
<button>Button B</button>
<input type="text" value="Input A">
@bulbul84
bulbul84 / index.html
Created December 10, 2021 15:36
Image changes randomly. Image swap animation.. Crossfade a 6 images grid randomly, one by one.
<div class="img-bank">
<img style="display:none" src="assets/img/fc-desktop-hero1.jpg" />
<img style="display:none" src="assets/img/fc-desktop-hero2.jpg" />
<img style="display:none" src="assets/img/fc-desktop-hero3.jpg" />
<img style="display:none" src="assets/img/fc-desktop-hero4.jpg" />
<img style="display:none" src="assets/img/fc-desktop-hero5.jpg" />
<img style="display:none" src="assets/img/fc-desktop-hero6.jpg" />
<img style="display:none" src="assets/img/fc-desktop-hero7.jpg" />
<img style="display:none" src="assets/img/fc-desktop-hero8.jpg" />
<img style="display:none" src="assets/img/fc-desktop-hero9.jpg" />
@bulbul84
bulbul84 / jquery.sticky.js
Created August 20, 2020 17:05
Height of element not going back to initial value when scrolling back to top of the page
/*Comment below line from jquery.sticky.js file */
/*s.stickyWrapper.css('height',s.stickyElement.outerHeight());*/
@bulbul84
bulbul84 / repeatable-input-fields.html
Created July 29, 2020 17:03
Add Remove Input Fields Dynamically using jQuery
<div id="another_medication" class="another_field">
</div>
<button id="add_another_btn" type="button" class="add_another"><img src="custom/images/plus-icon-green.png" alt="Add"></button>
<script type="text/javascript">
$(document).ready(function(){
var maxField = 6; //Input fields increment limitation
var addButton = $('#add_another_btn'); //Add button selector