Skip to content

Instantly share code, notes, and snippets.

View ruhul0's full-sized avatar
🎯
Focusing

Ruhul ruhul0

🎯
Focusing
View GitHub Profile
@ruhul0
ruhul0 / component-ui-accordion-animation-with-css-grid.markdown
Created April 15, 2025 15:08
component ui: accordion animation with css grid
@ruhul0
ruhul0 / 404_detect.js
Created February 14, 2024 10:26
Find 404 page inside HTML page
// Function to check for 404 errors
function checkFor404(url) {
// Make a HEAD request to check the status of the link
return fetch(url, { method: 'HEAD' })
.then(function(response) {
if (response.status === 404) {
return url;
} else {
return null;
}
function validateEmail(email) {
// var re = /\S+@\S+\.\S+/;
var re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
return re.test(email);
}
@ruhul0
ruhul0 / jquery-fix.js
Created July 7, 2022 04:44
" $ is not defined " solution for jquery
(function() {
var a = setInterval(function() {
if (typeof window.jQuery === 'undefined') {
return;
}
clearInterval(a);
/*
Add your code here
*/
}, 500);
@ruhul0
ruhul0 / gist:4fe5c45f7ea3e8a3e3d171dc2a22c66d
Created February 24, 2019 17:02 — forked from jaydson/gist:1780598
How to detect a click event on a cross domain iframe
var myConfObj = {
iframeMouseOver : false
}
window.addEventListener('blur',function(){
if(myConfObj.iframeMouseOver){
console.log('Wow! Iframe Click!');
}
});
document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){