javascript - How can I call back a function? -
I'm a little new on jquery codeverse. I would like to know how to call back the function CSZ after changing the size of a document. Here's my current setup:
$ (document) .ready (function CSZ () {| CODE |}); Then later, I want to call back the code with this function:
$ (window) .resize (CSZ); It seems that this is a very simple concept which is not working for me.
You can then refer to it for both the callback: < / P>
function CSZ () {// content} $ (document) .ready (CSZ); $ (Window) .resize (CSZ); Currently, CSZ is an identifier CSZ will only be within the scope of this function inside this function Who recognizes. By changing your example to follow, you > a function instead. This will then be available anywhere within that area where it appears (and scope of its descendants).
Comments
Post a Comment