Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Destroy/init stylesheet issue #227

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

Open
asapach opened this issue Sep 5, 2013 · 3 comments
Open

Destroy/init stylesheet issue #227

asapach opened this issue Sep 5, 2013 · 3 comments
Labels

Comments

@asapach
Copy link

asapach commented Sep 5, 2013

Currently when calling destroy(), it executes remove_style_tags() function. This removes the generated styles from the head if the document, but doesn't clean up Gridster.generated_stylesheets array, so when gridster is later initialized on the same page, it doesn't add the stylesheet. The following piece of code doesn't work as expected:

    // don't duplicate stylesheets for the same configuration
    var serialized_opts = $.param(opts);
    if ($.inArray(serialized_opts, Gridster.generated_stylesheets) >= 0) {
        return false;
    }
@riiad
Copy link

riiad commented Dec 11, 2013

Same issue here.

@claravanstaden
Copy link

Same issue here...

@claravanstaden
Copy link

Fixed by adding Gridster.generated_stylesheets = []; to destroy().

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

No branches or pull requests

3 participants