Skip to content

Commit

Permalink
Fix disclosure example jscs errors
Browse files Browse the repository at this point in the history
modified:   examples/disclosure/js/disclosureButton.js
Fixed 10 jscs errors using auto fix.
  • Loading branch information
mcking65 committed Jan 31, 2017
1 parent b930590 commit 7c03546
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions examples/disclosure/js/disclosureButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ ButtonExpand.prototype.init = function () {

var id = this.domNode.getAttribute('aria-controls');


if (id) {
this.controlledNode = document.getElementById(id);
}
Expand All @@ -50,15 +49,15 @@ ButtonExpand.prototype.init = function () {
ButtonExpand.prototype.showContent = function () {

if (this.controlledNode) {
this.controlledNode.style.display = "block";
}
this.controlledNode.style.display = 'block';
}

};

ButtonExpand.prototype.hideContent = function () {

if (this.controlledNode) {
this.controlledNode.style.display = "none";
this.controlledNode.style.display = 'none';
}

};
Expand All @@ -80,7 +79,7 @@ ButtonExpand.prototype.toggleExpand = function () {

ButtonExpand.prototype.handleKeydown = function (event) {

console.log("[keydown]");
console.log('[keydown]');

switch (event.keyCode) {

Expand Down Expand Up @@ -113,11 +112,11 @@ ButtonExpand.prototype.handleBlur = function (event) {

/* Initialize Hide/Show Buttons */

window.addEventListener('load', function(event) {
window.addEventListener('load', function (event) {

var buttons = document.querySelectorAll("[role=button][aria-expanded][aria-controls]");
var buttons = document.querySelectorAll('[role=button][aria-expanded][aria-controls]');

for(var i=0; i < buttons.length; i++) {
for (var i = 0; i < buttons.length; i++) {
var be = new ButtonExpand(buttons[i]);
be.init();
}
Expand Down

0 comments on commit 7c03546

Please sign in to comment.