Skip to content

Commit

Permalink
Make eslint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
otacke committed Dec 12, 2019
1 parent 2c2255a commit 665f081
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions h5p-accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,17 @@ H5P.Accordion = (function ($) {
}

// Insert content
$container.html('').addClass('h5p-accordion').append(self.$content);
self.$content.appendTo(
// Use container as tabpanel
$container.html('')
.addClass('h5p-accordion')
.attr({
'role': 'tablist',
'aria-multiselectable': 'false'
// Must be changed if we ever allow more tab to be open
// at the same time
})
);
};

/**
Expand Down Expand Up @@ -229,7 +239,7 @@ H5P.Accordion = (function ($) {
* @param {jQuery} $title The title of the panel that is to be expanded
* @param {jQuery} $panel The panel that is to be expanded
*/
Accordion.prototype.expandPanel = function($title, $panel) {
Accordion.prototype.expandPanel = function ($title, $panel) {
var self = this;

$title.attr('aria-expanded', true)
Expand All @@ -253,7 +263,7 @@ H5P.Accordion = (function ($) {
* @param {jQuery} $title The title of the panel that is to be collapsed
* @param {jQuery} $panel The panel that is to be collapsed
*/
Accordion.prototype.collapsePanel = function($title, $panel) {
Accordion.prototype.collapsePanel = function ($title, $panel) {
var self = this;
$title.attr('aria-expanded', false)
.removeClass('h5p-panel-expanded');
Expand All @@ -264,7 +274,7 @@ H5P.Accordion = (function ($) {
self.trigger('resize');
})
.attr('aria-hidden', true);
self.$expandedTitle = self.$expandedPanel = undefined;
self.$expandedTitle = self.$expandedPanel = undefined;
};

/**
Expand All @@ -282,7 +292,7 @@ H5P.Accordion = (function ($) {
var myId = nextLooperId++;
var self = this;
allowedLoopers.push(myId);
var looper = function(func, wait, myId) {
var looper = function (func, wait, myId) {
return function () {
if (self.allowedToWork(myId)) {
try {
Expand Down

0 comments on commit 665f081

Please sign in to comment.