Skip to content

Instantly share code, notes, and snippets.

@saifalbd
saifalbd / clock.html
Last active January 14, 2022 00:28
javaScript Svg Clock
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/svg.js/2.3.1/svg.js" integrity="sha512-c2Zoy/mmWREWl7sZ6VU4znK2dMdCOSHkidDP+MUVcQBJC7aneSUDjhMCPJGDyS/FK3ImV5WpO3gqL6ShwFeCvw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
@saifalbd
saifalbd / addOnScroll.js
Last active September 27, 2020 15:49
addOnScroll
<script>
const evaJannat = {
previusPos:0, // can not edit it
removeClassGapToBottom:200, // you can change is but must be graterthan addClassGapToBottom value
addClassGapToBottom:100,// you can change but must be smallerThen removeClassGapToBottom value
cl:'test', //
element(){
return document.querySelector('.backButton.js-backButton');
},
addCl(){
@saifalbd
saifalbd / HTML_Sortable_Table.html
Last active May 21, 2019 00:21
HTML Sortable Table example
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing', // RFC2518
103 => 'Early Hints',
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Content',
205 => 'Reset Content',
v => {
try {
const data = new String("!#$%&`()*+,./:;<=>?@[\]^_`{|}~");
data.split("").forEach( function(element, index) {
if (v.includes(element)) throw "this "+element+" characters not valid characters only accept for symbol hyphen (‐) "
});
if (v.includes(" ")) throw "multiline whiteSpace characters not valid characters only accept for symbol hyphen (‐) "
return true
} catch(e) {
@saifalbd
saifalbd / gist:51ae5eeb38e14326ef29c930e1c52bcc
Created October 29, 2018 07:42
vuetify media query mixin scss
@mixin xs {
/*
On screens that are 599px wide or less
*/
@media only screen and (max-width: 599px)
{@content;}
}
@saifalbd
saifalbd / javascript live date time and day
Created June 24, 2018 22:37
javascript-live-date-time-day
<!doctype html>
<html lang="en">
</head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
@saifalbd
saifalbd / javascript-session-advisement
Created April 11, 2018 16:04
javascript session advisement
<script>
document.addEventListener("click", function(){
const sesstionName = 'clicktime'; //must be string
const sesstionTime = 5; //min
const redirectUrl = 'http://www.google.com';
const startTime = Date.now();
var sessionData = sessionStorage.getItem(sesstionName);
if (!sessionData) {
@saifalbd
saifalbd / gist:b7d7895b339c1c13722f04d63a455f9f
Created April 3, 2018 12:12
select categories tags Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body style="padding: 0; margin: 0;">
<div class="col-12">
<div class="row no-gutters custom-multiselect" style="background:#DCEDC8; padding: 5px; border: 1px solid gold;">
@saifalbd
saifalbd / js-create-multi-element
Created March 21, 2018 11:46
javascript create multiple element with attr and append
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div class="play" id="demo"></div>