-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Dynamically load and unload stylesheets #771
Comments
This is pretty great, I would also like it if something like this was included in less.js |
Fixed in #2233. Please move any further conversation to that PR. |
Btw, should not we close this then? (Assuming Less is not a stylesheets manipulation library it's barely to include methods like above, and #2233 fixes this considering you load/unload stylesheets by whatever suitable methods externally (e.g. using jQuery)). |
Agree, this is solved. |
I'm making a website with HTML5 ajax navigation (dynamically changing page url and just replacing body content).
Therefore is the need to dynamically unload previous page styles and load new page styles.
Here is a working piece of code I'm using on my website.
It would be nice if you included something like this in your Less.js, so that we wouldn't need to hack into it again when newer versions are released.
I'm not making a pull request since this code extensively uses jQuery and I doubt that you'd like jQuery in your repo.
You may just rewrite this code the way you like it and include in the distribution.
The text was updated successfully, but these errors were encountered: