Skip to content

Instantly share code, notes, and snippets.

View bulbul84's full-sized avatar

Md Bulbul Hasan bulbul84

View GitHub Profile
@bulbul84
bulbul84 / gifImageNotWorking.txt
Created November 5, 2024 14:04
if gif image is not working iphone follow below step
If GIF animations aren’t working on your iPhone, there might be a few issues causing it. Here’s a guide to troubleshoot and fix this issue using JavaScript:
1. Verify GIF Support
Ensure the GIF itself is functioning correctly in your project by testing it in a different browser or device. If it works, then it’s likely an iOS-specific issue.
2. Use JavaScript to Reload GIF
Sometimes GIFs can stop playing after the first cycle on iOS. One common fix is to reload the GIF by changing the src attribute with JavaScript.
Here’s a snippet that you can use:
@bulbul84
bulbul84 / scripts.js
Created August 2, 2023 01:13
Disable cut, copy content from website
$(document).ready(function() {
$('body').bind('cut copy', function(e) {
e.preventDefault();
});
});
@bulbul84
bulbul84 / index.html
Created July 5, 2023 07:59
Bootstrap Tabs auto switch
<ul class="nav nav-tabs" id="myTab">
<li class="active"><a href="#Tab1">Tab 1</a>
</li>
<li><a href="#Tab2">Tab 2</a>
</li>
<li><a href="#Tab3">Tab 3</a>
</li>
@bulbul84
bulbul84 / scripts.js
Created May 15, 2023 10:14
How to add URL parameter to wordpress site for hide some section
(function ($) {
"use strict";
jQuery(document).ready(function($){
// For hiding section which is not needed at app
var headerSelector = "#masthead"; // header
var footerSelector = "#colophon"; // footer
var blogMenu = ".blog_menu_area"; // blogmenu
var blogSidebar = ".blog_sidebar"; // blog sidebar
@bulbul84
bulbul84 / index.html
Created March 30, 2023 12:48
HTML5 Video Autoplay For Angular Page
<video class="hero_bg_video" width="560" height="315" poster="assets/images/longevityPlaybook/longevity-hero-video-poster2.webp" autoplay loop muted oncanplay="this.play()" onloadedmetadata="this.muted = true">
<source src="assets/images/longevityPlaybook/videos/longevity-hero-video3.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
@bulbul84
bulbul84 / style.css
Created December 6, 2022 13:38
Simple CSS Reset
/* makes sizing simpler */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* remove default spacing */
/* force styling of type through styling, rather than elements */
@bulbul84
bulbul84 / index.html
Created December 5, 2022 18:53
HTML Input fields style by CSS
<form action="#" id="form_affiliates">
<div class="affliate-form">
<div class="form-group input_fields">
<input type="text" id="organization" class="form-control" placeholder=" " name="organization" required>
<label for="organization">Organization</label>
</div>
<div class="form-group input_fields">
<input type="text" id="websiteurl" class="form-control" placeholder=" " name="websiteurl" required>
<label for="websiteurl">Website URL</label>
@bulbul84
bulbul84 / scripts.js
Created July 25, 2022 18:07
add loading icon for multistep form
<script>
$(document).ready(function() {
$("#email_submit").on("click", function() {
$(".multistep_form").addClass("loading");
setTimeout(function() {
$(".multistep_form").removeClass("loading");
}, 500);
});
});
</script>
@bulbul84
bulbul84 / scripts.js
Created July 25, 2022 18:05
responsive jquery css code
<script>
$(function(){
if ($(window).width() < 768) {
$("#filter").focus(function() {
$('html,body').animate({
scrollTop: $(".advisor_single_input").offset().top - 0},'slow');
});
$("#filter").focusout(function() {
@bulbul84
bulbul84 / index.html
Created July 25, 2022 13:25
How to check password strength / length / requirements
<div class="row" id="idpassword">
<div class="col-sm-6">
<div class="form-group input_fields">
<input class="form-control" type="password" name="password" id="password" required>
<p class="show_hide" id="pass1">Show</p>
<label for="password">Password </label>
</div>
</div>
<div class="col-sm-6">
<div class="form-group input_fields">