Pure JavaScript
document.getElementsByClassName('drill_cursor')[0]
.addEventListener('click', function (event) {
// do something
});
jQuery
$(".drill_cursor").click(function(){
//do something
});
More Related Contents:
- Make file not show anything in console [closed]
- Avoid generating errors when using unsupported HTML features
- Changing HTML with Javascript when a link is clicked on? [duplicate]
- Can one AngularJS controller call another?
- How to get the selected radio button’s value?
- JQuery: How to call RESIZE event only once it’s FINISHED resizing?
- Insert HTML with React Variable Statements (JSX) [duplicate]
- JavaScript not running on jsfiddle.net
- Can I apply the required attribute to fields in HTML5?
- Open links made by createObjectURL in IE11
- How to Implement DOM Data Binding in JavaScript
- HTML5 Canvas drawImage ratio bug iOS
- Is it possible to access an SQLite database from JavaScript?
- How to get html elements from an object tag?
- Do I need to hide API key when using google maps js API? If so, how?
- Detect if HTML5 Video element is playing [duplicate]
- get a list of all folders in directory [closed]
- location.host vs location.hostname and cross-browser compatibility?
- How do I change the ID of a HTML element with JavaScript?
- How to save data from a form with HTML5 Local Storage?
- Submit form after calling e.preventDefault()
- JSON.stringify output to div in pretty print way
- Close a div by clicking outside
- Change form values after submit button pressed
- How do you automatically set the focus to a textbox when a web page loads?
- JavaScript on the bottom of the page?
- Vue.js data-bind style backgroundImage not working
- How to set the loudness of HTML5 audio?
- Using Javascript to compare two input numbers in HTML?
- Disable scrolling on “