Skip to content

Commit

Permalink
Update selector helper class and cleaned default example
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Duarte committed Sep 2, 2015
1 parent b01619c commit 24a06cc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
11 changes: 1 addition & 10 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<meta name="viewport" content="initial-scale=1, user-scalable=no">
<link rel="stylesheet" href="css/example.css">
<link rel="stylesheet" href="../css/wallop.css">
<link rel="stylesheet" href="../css/wallop--slide.css">
</head>
<body>

Expand All @@ -15,7 +14,7 @@ <h1>Wallop Examples</h1>
<h2>Default</h2>

<!-- SLIDER STARTS -->
<div class="Wallop Wallop--slide">
<div class="Wallop">
<div class="Wallop-list">
<div class="Wallop-item"><img src="imgs/1.jpg"></div>
<div class="Wallop-item"><img src="imgs/2.jpg"></div>
Expand All @@ -37,14 +36,6 @@ <h2>Default</h2>
// New instance of Wallop
var slider = document.querySelector('.Wallop');
var Wallop = new Wallop(slider);

Wallop.on('change', function(e) {
console.log('changed -> ', e.detail);
});

document.addEventListener('click', function(e) {
console.log('e.target -> ', e.target);
});
</script>

</body>
Expand Down
2 changes: 1 addition & 1 deletion js/Wallop.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@

function $$(element) {
if (!element) { return; }
return document.getElementsByClassName(element);
return document.querySelectorAll('.' + element);
}

function addClass(element, className) {
Expand Down
2 changes: 1 addition & 1 deletion js/Wallop.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "zuul --local 9966 -- test.js",
"ci": "zuul -- test.js",
"uglify": "./node_modules/.bin/uglifyjs ./js/Wallop.js -o ./js/Wallop.min.js --comments -m -c ",
"build": "npm run test && npm run uglify"
"build": "npm run uglify"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 24a06cc

Please sign in to comment.