Im trying to call to self-invoking function this way:
(function fullscreen(){
alert("test");
})();
$(window).resize(function() {
fullscreen();
});
it works only once. no response on window.resize thanks
What you're doing does not make sense. Why is fullscreen
self-invoking? Just do this:
function fullscreen() {
alert("test");
}
fullscreen();
$(window).resize(fullscreen);
// or
$(window).resize(function () {
fullscreen();
});