Open wonderment opened 9 years ago
Hey @wonderment, I doubt this is meant to work with the window
object, which has it's own resize
event and which is actually the only one that triggers a natural resize
event. This plugin is a workaround for all other elements, which don't trigger this event when they get resized.
I suppose you want to remove that listener, just perform a regular jquery unbind
:
$(window).unbind("resize", do_something);
// or
$(window).off("resize", do_something);
Agree with @andreicojea . Could this issue just be closed?
I've installed via Bower, which drops in the /javascript-detect-element-resize/detect-element-resize.js file.
If I have the following in the js:
It seems to fire as if I had a regular resize event on the window.
Adding:
...throws a "Uncaught TypeError: undefined is not a function". And if I point it to an element it simply does not fire. The script is loading fine, so I'm confused.
What am I missing?