I have a function that is attached when the page loads. It works:
Element is:
<img src="scroll.gif" id="leftScroll">
JS function is:
leftScroll.onmousedown = function(event) {
However, I'd like to attach it to 2 other elements as well, midScroll and rightScroll. How do I do this? I've tried this and several other variants and it doesn't work:
$("#leftScroll", "#midScroll", "#rightScroll").onmousedown( function(event) {
or this
$("#leftScroll", "#midScroll", "#rightScroll").onmousedown = function(event) {
What I have tried:
$("#leftScroll", "#midScroll", "#rightScroll").onmousedown( function(event) {
or this
$("#leftScroll", "#midScroll", "#rightScroll").onmousedown = function(event) {