Skip to content

Commit

Permalink
Remove unnecessary <a/> from the toggle button
Browse files Browse the repository at this point in the history
  • Loading branch information
rfletcher committed Feb 26, 2012
1 parent 16ab84f commit 8b3e474
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/formattedJSON.js
Expand Up @@ -126,7 +126,7 @@
var toolbar = this._html( html );
document.body.insertBefore( toolbar, document.body.firstChild );

var toggle = document.getElementById( "toolbar" ).getElementsByTagName( "a" )[0];
var toggle = document.getElementById( "toolbar" ).getElementsByTagName( "li" )[0];

toggle.addEventListener( "click", function() {
formatJSON._toggleClass( document.body, "before" );
Expand Down
7 changes: 4 additions & 3 deletions src/proxy.html
Expand Up @@ -61,9 +61,10 @@
-webkit-user-select: none;
z-index: 9999;
}
#toolbar a {
#toolbar li {
background: -webkit-gradient( linear, 0 0, 0 100%, from(#f4f4f4), to(#bebebe) );
color: #3f3f3f;
cursor: pointer;
display: inline-block;
font-size: 11px;
font-weight: bold;
Expand All @@ -72,7 +73,7 @@
text-decoration: none;
text-shadow: 0 1px rgba(255, 255, 255, 0.8);
}
#toolbar a:active {
#toolbar li:active {
background: -webkit-gradient( linear, 0 0, 0 100%, from(#bebebe), to(#f4f4f4) );
}

Expand Down Expand Up @@ -148,7 +149,7 @@
</head>
<body>
<ul id="toolbar">
<li><a href="#">Toggle Formatting</a></li>
<li>Toggle Formatting</li>
</ul>
</body>
</html>

0 comments on commit 8b3e474

Please sign in to comment.