December 9, 201213 yr hi is there any event handler for background image click in js or jQuery ? from what I know background image is not part of DOM, my solution is to define a DIV with the same dimensions as background image and the same x-y position then defining the event on this DIV. is there any better solution ? tnx. Edited December 9, 201213 yr by stallman3738
December 9, 201213 yr Hi Stallman, surely the div/element that the background image is part of will be the same size? If that is the case, just define an onclick handler for the element.
December 9, 201213 yr Author Hi Stallman, surely the div/element that the background image is part of will be the same size? If that is the case, just define an onclick handler for the element. yes I took image size which is 16X16px icon then <div style='width:16px;height:16px'></div> worked !
Create an account or sign in to comment