From d6587155be7f3664f16078ce90b349ddb76a7c1a Mon Sep 17 00:00:00 2001 From: John Cleaver Date: Thu, 17 Mar 2016 09:38:29 -0400 Subject: [PATCH] OnClick assignment now gets executed. --- main.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) 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'); - }); - -});