Skip to content

Instantly share code, notes, and snippets.

View tsevdos's full-sized avatar
🏠
Working from home

John Tsevdos tsevdos

🏠
Working from home
View GitHub Profile
getEventListeners( $('input') );
console.log('Window : ' + window ) // Window : [object Window]
console.log('Window : ', window ) // logs correctly the Window object
console.log('Window : ', window , 'Object : ', object) // logs everything as expected
monitorEvents( $('input') ); // Logs ALL the events
monitorEvents( $('input') , 'click' ); // Logs only click events
monitorEvents( $('input') , ['click' , 'blur' ] ); // Logs only click and blur events
unmonitorEvents( $('input') ); // Stop loging the events of the specific element
$$('a') // returns all link elements
document.querySelectorAll('a') // returns all link elements
$$('a') === document.querySelectorAll('a') // true!
$('a') // returns the first link element
document.querySelector('a') // returns the first link element
$('a') === document.querySelector('a') // true!
<a href="tel:+306948123456">+306948123456</a>
<a href="sms:+306948123456">+306948123456</a>
<input type="file" accept="image;capture=camera" />
<input type="file" accept="video;capture=camcorder" />
<input type="file" accept="audio;capture=microphone" />
$(el).prop('tagName').toLowerCase();
<!-- base tag -->
<base href="http://www.example.com/" />
$(el).prop('tagName');