VUE.JS create switch function vuejs - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution
join us

create switch function vuejs


 555

Show Result
file.css
VUE.JS


1

<html>
<head>
<title>VueJs</title>
<script type = "text/javascript" src = "https://cdnjs.cloudflare.com/ajax/libs/vue/0.12.7/vue.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/project/little1/sl_JzfwgQ8Jtu202121663/file.css">
</head>

<body class="text-center body"
v-class="body-on: lights, body-off: !lights">
<button v-on="click: flipSwitch"
v-class="btn-danger: lights, btn-success: !lights"
class="btn">
<span class="fa fa-power-off"></span>
</button>

<script type = "text/javascript">

new Vue({
el: 'body',
data: {
lights: true
},
methods: {
flipSwitch: function() {
this.lights = !this.lights;
}
}
});

</script>

</body>

</html>


By        
The power of the user (%)
5%



The most helpful VUE.JS solutions

get ip address using vuejsget ip address using vuejsVUE.JS

Click to see more ...

  9.3K     76

create calendar using vuejscreate calendar using vuejsVUE.JS

Click to see more ...

  1.7K     53

get client city using vuejsget client city using vuejsVUE.JS

Click to see more ...

  838     41

parse json url using vuejsparse json url using vuejsVUE.JS

Click to see more ...

  703     36

create star rating using vuejs and csscreate star rating using vuejs and cssVUE.JS

Click to see more ...

  664     21

get country using vuejsget country using vuejsVUE.JS

Click to see more ...

  1.3K     17

get client region name using vuejsget client region name using vuejsVUE.JS

Click to see more ...

  447     13

get client latitude longitude using vuejsget client latitude longitude using vuejsVUE.JS

Click to see more ...

  526     12

create switch function vuejscreate switch function vuejsVUE.JS

Click to see more ...

  555     11

get client timezone using vuejsget client timezone using vuejsVUE.JS

Click to see more ...

  438     9

Welcome aboard!
We are happy you are here and
wish you good net-raft!