diff --git a/main.js b/main.js index 9012a46..53287e1 100644 --- a/main.js +++ b/main.js @@ -7,6 +7,11 @@ var v = new Vue({ }, ready: function(){ this.fetchData(); + $('.list-group-item').on('click', function() { + $('.glyphicon', this) + .toggleClass('glyphicon-chevron-right') + .toggleClass('glyphicon-chevron-down'); + }); }, methods: { fetchData: function(){ @@ -18,13 +23,3 @@ var v = new Vue({ } } }); - -$(function() { - - $('.list-group-item').on('click', function() { - $('.glyphicon', this) - .toggleClass('glyphicon-chevron-right') - .toggleClass('glyphicon-chevron-down'); - }); - -});