Skip to content

Instantly share code, notes, and snippets.

View apelmahmudDev's full-sized avatar
:octocat:
code, gardening, book collection

Apel Mahmud apelmahmudDev

:octocat:
code, gardening, book collection
View GitHub Profile
@apelmahmudDev
apelmahmudDev / 4k_website_tester.html
Created December 22, 2021 14:41 — forked from jasonhejna/4k_website_tester.html
Test a website in 4k resolution without a 4k monitor
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>4k website tester</title>
<style>
iframe:focus {
outline: none;
}
iframe{
@apelmahmudDev
apelmahmudDev / event-delegation-example.js
Created August 11, 2021 15:22
event-delegation-example 2
জাভাস্ক্রিপ্ট
const palette = document.querySelector('#palette');
palette.addEventListener('click', handleColorClick);
function handleColorClick(el) {
console.log(`You clicked on this color: ${el.target.style.backgroundColor}`);
}
@apelmahmudDev
apelmahmudDev / event-delegation-example.html
Created August 11, 2021 15:21
event-delegation example
এইচটিএমএল
<ol class="color-palette" id="palette">
// colors element
</ol>
@apelmahmudDev
apelmahmudDev / style.css
Created August 11, 2021 14:35
event-style-example
body {
font-family: sans-serif;
}
#header {
padding: 20px;
background-color: green;
display: flex;
flex-direction: row-reverse;
}
@apelmahmudDev
apelmahmudDev / event-example2.js
Last active August 11, 2021 14:32
Event-bubble
document.querySelector('#signup').addEventListener('click', () => {
console.log('Sign up button click');
});
document.querySelector('#signin').addEventListener('click', () => {
console.log('Sign in button click');
});
@apelmahmudDev
apelmahmudDev / event-example1.html
Last active August 11, 2021 14:10
dom-example
<header id="header">
<div id="account_links">
<a href="#" id="signup">Sign up</a>
<a href="#" id="signin">Sign in</a>
</div>
</header>