var myElm = $(".some-element-class"); myElm[0].someFunction = function() { console.log("here"); } if(myElm[0].someFunction !== undefined && myElm[0].someFunction != null && typeof myElm[0].someFunction == "function") { myElm[0].someFunction(param1, param2); }
No comments:
Post a Comment