0
hooks.before = function (postdata) {
  document.getElementById("savebtn").disabled = true;
};

I'm trying to create hooks in javascript as WordPress do_action but didn't find any solution yet

  • Does this answer your question? [Need to hook into a javascript function call, any way to do this?](https://stackoverflow.com/questions/10273309/need-to-hook-into-a-javascript-function-call-any-way-to-do-this) – Pushprajsinh Chudasama Dec 07 '19 at 05:05
  • I want to add a hook in a javascript file like we add do_action in WordPress and perform some function on another javascript file using that hook like we do add_action in WordPress and also pass some variables. – Sweta Singh Dec 07 '19 at 06:43

0 Answers0