javascript - Find all onclick attributes and append a value to them -
I am trying to find all the elements with a Something is clearly wrong, but what? All you need to do is try this for each element: onclick attribute and toggle the " () "Add"
var original attribute = $ ('[onclick]'). Attr ('onclick'); $ ('[Onclick]') Attr ('onclick', original attribute + 'toggle ()');
$ ('[onclick]'). Attr ('onclick'); First will return a value for the mailing element.
$ ('[onclick]'). Each (function () {var $ this = $ (this); var originalAttribute = $ this.attr ('onclick'); $ This.attr ('onclick', original attribute + 'toggle');}) ;
Comments
Post a Comment