make a custom event for addEventListener in Javascript -
What I would like to do is register a custom event in Javascript (I'm working with HTML + CSS + Javascript + jQuery
But this "custom event" is not a predefined event. What I'm looking for:
document.addEventListener ($ (# div1). CSS ("width") == "35px" (or, another example status :) $ (# Div1) .css ("left") == "20px" (or, condition of another example :) $ (# div1) .css ("color") == "#ff 20000", function (); );
Is this possible? How is the right syntax? Inside and if? I mean: document.addEventListener (if ($ (# div1) .css ("width") == "35px"), function (););
I do not know how this "customized Damon" work!
There is no such event in the browser, which reaches a particular diva 35px The type of code you are trying to write a width or a specific color of
is not directly possible.
There are incidents for some other types of things that may be due to the width of the div changing the way the window is resized if you can tell us which action to change its width , Then we may be able to offer other ideas about how you are trying to capture.
Whether to register event handlers for other events (such as window resizing) and then check to see if any of your circumstances have been completed or your code has been called, it Checks whether any of these rules have been completed, your code may change other domains, which can change one of these properties or use the voting timer to complete any of these conditions. Bone (not recommended because it is disabled).
Comments
Post a Comment