Permalink
Browse files

Prefix class names with `js-` when used in JS.

HTML element class names reference by Javascript code are prefixed with `js-`.
  • Loading branch information...
1 parent 8e0bfc5 commit 295e719974add2b69c070e9b2b22606dbcc36b57 @hdemers committed Feb 28, 2014
Showing with 7 additions and 8 deletions.
  1. +1 −2 birdwtch/static/css/app.less
  2. +3 −3 birdwtch/static/js/app.js
  3. +3 −3 birdwtch/templates/index.html
@@ -209,8 +209,7 @@ svg, canvas {
// Graph related style
-
-.language-graph {
+.js-language-stackedbar {
float: right;
height: 100%;
width: @graphwidth;
@@ -89,10 +89,10 @@ stackedbar) {
}, 4000);
// Create a bar chart for showing language frequencies.
- language_bar = stackedbar.create(".language-graph");
- language_chart = barchart.create(".graph .languages");
+ language_bar = stackedbar.create(".js-language-stackedbar");
+ language_chart = barchart.create(".graph .js-language-barchart");
// Create a bar chart for showing country frequencies.
- country_chart = barchart.create(".graph .countries", {
+ country_chart = barchart.create(".graph .js-country-barchart", {
width: 700,
max: 30
});
@@ -43,22 +43,22 @@
<div class="row">
<div class="col-md-12">
<div class="graph">
- <div class="languages"></div>
+ <div class="js-language-barchart"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="graph">
- <div class="countries"></div>
+ <div class="js-country-barchart"></div>
</div>
</div>
</div>
</div>
- <div class="language-graph"></div>
+ <div class="js-language-stackedbar"></div>
</div>

0 comments on commit 295e719

Please sign in to comment.