JavaScript When radio selected, change image src on vue.js version2 jquery when radio selected,when radio button selected,when radio

I want to change image and that trigger an image update.

This is for example http://jsbin.com/kuluyike/3/edit?html,js,output

  <div id="colorPicker">
    <img v-attr="src:color" alt="{{color}}">
    <ul>
      <li v-repeat="colors">
        <label>
          <input type="radio" id="{{name}}" name="color" v-model="color" value="{{image}}">
          {{name}}
        </label>
      </li>
    </ul>
  </div>


  var cp = new Vue({
    el: '#colorPicker',

    data: {
      colors: [
        {
          name: 'red',
          image: 'red.jpg'
        },
        {
          name: 'pink',
          image: 'pink.jpg'
        },
        {
          name: 'blue',
          image: 'blue.jpg'
        }
      ]
    }
  });

But this is not working on Vue.js version 2.x

How do I change the code so working based on version 2.x

Answer:1

I have multiple sliders which is defined by document.querySelectorAll( '.js-slider' ); on tooltips.format I would like to insert a label above the value, which is defined on the current slide object ...

I have multiple sliders which is defined by document.querySelectorAll( '.js-slider' ); on tooltips.format I would like to insert a label above the value, which is defined on the current slide object ...

How can i return array position of each object in an array. code let targets = [1.2, 2.3, 3.5]; let targetUpdatedOn = [2018-07-06, 2018-07-06, 2018-07-06]; let liveCoinPrice = 1.3; let targets_hit =...

How can i return array position of each object in an array. code let targets = [1.2, 2.3, 3.5]; let targetUpdatedOn = [2018-07-06, 2018-07-06, 2018-07-06]; let liveCoinPrice = 1.3; let targets_hit =...

I got an image in canvas. I need to scale my image to the top, to the bottom, to the left and to the right differently. Function drawImage has only width and height parameters, but not top, bottom, ...

I got an image in canvas. I need to scale my image to the top, to the bottom, to the left and to the right differently. Function drawImage has only width and height parameters, but not top, bottom, ...

I'm drawing a dashed line and a dashed rect in fabricjs, but there is an issue when setting the strokeWidth too high for the line/rect to draw the strokeDashArray properly. Example: if ...

I'm drawing a dashed line and a dashed rect in fabricjs, but there is an issue when setting the strokeWidth too high for the line/rect to draw the strokeDashArray properly. Example: if ...