Search the blog

Create a checkbox like this:

<input type="checkbox" @change="detectChange($event);" name="foo" value="bar" />

Then you can detect the change like this:

// Excerpt of Vue component
methods: {
    detectChange: function($event) {

        var _self = this;

        var checked = $($event.srcElement).is(':checked');


Tim Bennett is a freelance web designer from Leeds. He has a First Class Honours degree in Computing from Leeds Metropolitan University and currently runs his own one-man web design company, Texelate.