summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Park <thomas@thomaspark.me>2013-12-07 12:55:02 -0500
committerThomas Park <thomas@thomaspark.me>2013-12-07 12:55:02 -0500
commit34f008a0128a5049c6bf4d7a34caffcb9a94bb48 (patch)
tree88855b4e2e314c08518348b0a6c72f1f109722ac
parent216c4ab6c8e92caf26fb1396dd13ae7ec7da227c (diff)
test: prevent cached stylesheet
-rw-r--r--tests/components.html21
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/components.html b/tests/components.html
index 2bb67b65..94a7929f 100644
--- a/tests/components.html
+++ b/tests/components.html
@@ -4,7 +4,7 @@
<title>Bootswatch: Components</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
- <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css" media="screen" id="stylesheet">
+ <link rel="stylesheet" href="../amelia/bootstrap.css" media="screen" id="stylesheet">
<link rel="stylesheet" href="../assets/css/bootswatch.min.css">
<style>
@@ -87,8 +87,8 @@
<div class="container">
<div class="page-header">
- <h1 id="theme">Bootstrap</h1>
- <p id="description" class="lead">The original</p>
+ <h1 id="theme">Amelia</h1>
+ <p id="description" class="lead">Sweet and cheery</p>
</div>
@@ -2745,11 +2745,16 @@
$('body').append(menuHTML);
$('#menu').change(function(){
- var theme = $('#menu :selected');
- $('#theme').text(theme.text());
- $('#description').text(theme.data('description'));
- theme = '../' + theme.text().toLowerCase() + '/bootstrap.min.css';
- $('#stylesheet').attr('href', theme);
+ var $theme = $('#menu :selected'),
+ theme = $theme.text(),
+ description = $theme.data('description'),
+ date = new Date(),
+ time = date.getTime()
+ url = '../' + theme.toLowerCase() + '/bootstrap.css?' + time;
+
+ $('#theme').text(theme);
+ $('#description').text(description);
+ $('#stylesheet').attr('href', url);
});
}, "json");