How can I change Bootstrap CSS file in ASP.NET? -
is possible alter between 2 css files?
for example: have default bootstrap theme, want create dropdown list list of themes, user can select theme wants. searching find can have that:
<link type="text/css" rel="stylesheet" href="../content/bootstrap.min.css" title="default"/> <link type="text/css" rel="alternate stylesheet" href="../content/bootstrap.min.cosmo.css" title="cosmos"/>
and can alter javascript function:
<script> function setactivestylesheet(title) { var i, a, main; (i = 0; (a = document.getelementsbytagname("link")[i]) ; i++) { alert(a.href); if(a.getattribute("rel").indexof("style") != -1 && a.getattribute("title")) { a.disabled = true; if(a.getattribute("title") == title) a.disabled = false; } } } </script>
but when click button, think page refresh , returns default theme. there way permanently alter theme?
yes can! must url of css file , add together bundleconfig , refresh page. if need reference workout take of link
css asp.net twitter-bootstrap
No comments:
Post a Comment