How Do I Make Changes In .css File Using Jquery Or Javascript?
Solution 1:
Nope, you can't. You can override the css values with inline one. Because of *.css
files are static and placed on the server - you can't bring any changes to the server css file. The only way - use server side of the application (PHP, ASP.NET, etc)
Solution 2:
I Don't think there is any easy way for what are you looking for..!!
Solution 3:
Not really.
There's some ActiveX stuff in IE that lets you modify things in the file system but aside from not being a recomended solution, they'd only work in IE anyway.
You can still modify the styles your page uses for selectors in your css files, but you won't actually be modifying the css file itself.
Solution 4:
You can't physically change the contents of a file using Javascript in a browser. That's for security reasons, so that content on a web page can't manipulate content on your computer (apart from cookies).
Solution 5:
You cannot do it directly within jQuery, but you can load the .css file with jQuery, edit the contents and then send the data to a php or asp.net page which overrides the .css file with the new contents. But this is very dangerous because people can exploit the code and save any data in that .css file unless you have some security procedure but I can't think of any way you can make that work safely.
Post a Comment for "How Do I Make Changes In .css File Using Jquery Or Javascript?"