1

I am building a tree traversal in vue.js. When I click on parent checkbox, it will check all child checkbox. This is work fine for in jquery, but is this possible to construct only with javascript ?

My jquery code is :

$(".clickevent").click(function() {
    $(this).closest('ul').hide();
    $(this).parent().children().toggle();
    $(this).toggle();
});

This works fine for me, but I need to know whether is this possible in vue.js without jquery ? If this possible, how to do this ?

Update :

My HTML Code is here :

<ul>
 <li>Parent1
  <ul>
   <li>child1</li>
   <li>child2</li>
   <li>child3</li>
   <li>child4</li>
  </ul>
 </li>
</ul>
Shiva Kumar
  • 85
  • 1
  • 10
  • can you add some html so we can see how that is configured? this can also be achieved in "Vanilla" JS – Ishey4 Dec 09 '16 at 13:50

0 Answers0