Permalink
Browse files

feat(accordion): data-behavior=accordion can now be used, used for ex…

…pandable table
  • Loading branch information...
lara-aigmueller committed Sep 14, 2016
1 parent fb0896c commit 86424e96d4a04217709f3db8570989ddc51b33b5
@@ -1,4 +1,5 @@
import $ from '../js-common-components/dollar';
require('../js-common-components/accordion');
const toggleClass = 'is-expanded';
@@ -16,7 +16,7 @@ const handleClick = (ev) => {
};
const init = () => {
$('.table--expandable .expandable__trigger').forEach(el => {
$('[data-behavior*=accordion] .expandable__trigger').forEach(el => {
el.addEventListener('click', handleClick);
});
};
View
@@ -1,4 +1,3 @@
require('./js-common-components/toggler');
require('./js-common-components/closest');
require('./expandable/expandable');
require('./table-expandable/table-expandable');
@@ -1,4 +1,4 @@
<table class="table table--expandable">
<table class="table table--expandable" data-behavior="accordion">
<thead>
<tr>
<th>Name</th>
@@ -1,5 +1,5 @@
<div class="theme--blue">
<table class="table table--expandable">
<table class="table table--expandable" data-behavior="accordion">
<thead>
<tr>
<th>Name</th>
@@ -1,5 +1,5 @@
<div class="theme--royalblue">
<table class="table table--expandable">
<table class="table table--expandable" data-behavior="accordion">
<thead>
<tr>
<th>Name</th>
@@ -1,5 +1,5 @@
<div class="theme--green">
<table class="table table--expandable">
<table class="table table--expandable" data-behavior="accordion">
<thead>
<tr>
<th>Name</th>

0 comments on commit 86424e9

Please sign in to comment.