Remove jQuery dep

This commit is contained in:
Martin Polden 2014-01-26 21:57:59 +01:00
parent a67a47a93f
commit 9455df2635
3 changed files with 12 additions and 14 deletions

View File

@ -1,14 +1,14 @@
/*jslint es5: true, indent: 2, browser: true*/
/*global jQuery: true*/
(function ($) {
(function () {
'use strict';
$(document).ready(function () {
$('#select-command').on('change', function () {
$('.command').text($(this).val());
});
});
})(jQuery);
var onLoad = function (event) {
var select = document.querySelector('#select-command');
select.addEventListener('change', function () {
[].forEach.call(document.querySelectorAll('.command'), function (el) {
el.innerHTML = this.value;
}, this);
});
}
document.addEventListener('DOMContentLoaded', onLoad);
})();

View File

@ -1 +0,0 @@
!function($){"use strict";$(document).ready(function(){$("#select-command").on("change",function(){$(".command").text($(this).val())})})}(jQuery);

View File

@ -65,7 +65,6 @@
</div>
</div>
<a href="https://github.com/martinp/ifconfig"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="/assets/js/app.min.js"></script>
<script src="/assets/js/app.js"></script>
</body>
</html>