Yeah, it’s pretty simple.
var div = document.getElementById("player1");
div.onmousedown = function() {
div.innerHTML = "stuff!"
};
JSFiddle: (click on test) http://jsfiddle.net/yjdfg/
More Related Contents:
- When we using alert vs popup div tag? [closed]
- Dynamically adding div on button click and changing Id of each?
- How to make page loaders/animations/transitions
- Get specific text from html tag jquery [duplicate]
- jQuery Set Cursor Position in Text Area
- How to detect DIV’s dimension changed?
- Make header and footer files to be included in multiple html pages
- How do I link a JavaScript file to a HTML file?
- Force a browser to save file as after clicking link [duplicate]
- “Mixed content blocked” when running an HTTP AJAX operation in an HTTPS page
- How to check “checkbox” dynamically – jQuery Mobile
- Integrating Dropzone.js into existing HTML form with other fields
- Dropdown select with images
- How to find a parent with a known class in jQuery?
- Generic way to detect if html form is edited
- Is there a way to create out of DOM elements in Web Worker?
- Avoid window jump to top when clicking #-links
- how to move a div with arrow keys
- jQuery Change event on an element – any way to retain previous value?
- How to build simple tabs with jQuery?
- Emailing to multiple recipients with html Mailto: not working
- Bootstrap Dropdown with Hover
- Is it possible to append a div inside an SVG element? [duplicate]
- How can I get all a form’s values that would be submitted without submitting [duplicate]
- Jquery click event not firing on the element created dynamically using jquery
- How to show hidden divs on mouseover?
- Using .after() to add html closing and open tags
- Changing “src” attribute of
- How to get an element by its href in jquery?
- Keep tabbing within modal pane only