jquery Programming Glossary: allelements
get all elements with onclick in them? http://stackoverflow.com/questions/2878445/get-all-elements-with-onclick-in-them you're looking for a way to see if there has been code attached to an element's onclick event If so try this var allElements document.getElementsByTagName ' ' for var i 0 i allElements.length i if allElements i .className 'theClassNameYoureLookingFor'.. attached to an element's onclick event If so try this var allElements document.getElementsByTagName ' ' for var i 0 i allElements.length i if allElements i .className 'theClassNameYoureLookingFor' continue if typeof allElements i .onclick 'function'.. onclick event If so try this var allElements document.getElementsByTagName ' ' for var i 0 i allElements.length i if allElements i .className 'theClassNameYoureLookingFor' continue if typeof allElements i .onclick 'function' do something with the element..
|