<div class="btn">
<button id="1">1</button>
<button id="2">2</button>
<button id="3">3</button>
</div>
<ul class="list" data-id="1">
<li>...</li>
</ul>
<ul class="list" data-id="2">
<li>...</li>
</ul>
<ul class="list" data-id="3">
<li>...</li>
</ul>
window.onload = function () {
let btnGroup = document.querySelector(".btn");
let lists = document.querySelectorAll(".list");
btnGroup.addEventListener("click", function(e){
e.preventDefault();
[].slice.call(lists).forEach(function(it){
it.classList.add("hide");
})
let id = e.target.id;
let ul = document.querySelector('[data-id="'+id+'"]');
ul.classList.remove('hide');
});
}
header('Location: http://blabla.net/personal/order/make/neworder.php?clear_cache=Y');
if (!isset($_GET['clear_cache'])) {
header('Location: http://blabla.net/personal/order/make/neworder.php?clear_cache=Y');
}
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel-loader?presets[]=es2015,presets[]=react,presets[]=stage-0'
},
...
]
}
module: {
rules: [
{
test: /\.js$/,
exclude: /\/node_modules\//,
use: [
{
loader: 'babel-loader',
options: {
presets: ['es2015', 'stage-0', 'react']
}
}]
},
...
]
}