Get started with jsel CDN
MIT licensed
JQuery Event Listener: Lightweight library for jQuery-style custom event handling in JS.
Tags:- xpath
- json
- javascript
- expression
- matching
- selector
Stable version
Copied!
How to start using jsel CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with jsel CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/jsel/1.1.6/jsel.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Select elements using jSEL
const input = $('input[type="text"]')[0];
const button = $('button')[0];
// Attach an event listener to the button
button.addEventListener('click', function() {
const text = input.value;
alert('You entered: ' + text);
});
});
</script>
</head>
<body>
<input type="text" placeholder="Enter some text">
<button>Click me</button>
</body>
</html>
Copied!
Copied!
Copied!