Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resize fire only once #2

Open
noamberda opened this issue Aug 16, 2011 · 1 comment
Open

resize fire only once #2

noamberda opened this issue Aug 16, 2011 · 1 comment

Comments

@noamberda
Copy link

Hi Ben,
I am using your great solution but i have small problem. Somehow the resize event is fired only once when i set the container size. if i don't set the container size its working fine but i need to change it :).

here is the code i am using, very simple. rootContainer is a div that holds mapContainer. i am using the resize event to make the map container 100%. when i set the size on the mapContianer the event is not fired any more if there is a change is the size.

$(function () {
    $("#rootContainer").resize(function () {
        applyMapResize();
    });

    applyMapResize();
});

function applyMapResize() {
    $("#mapContainer").height($("#rootContainer").height());
}
@cowboy
Copy link
Owner

cowboy commented Aug 16, 2011

@noamberda, can you create a simplified test case on http://jsfiddle.net/ for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants