How execute a oncomplete script for many divs based on class selctor?

How execute a oncomplete script for many divs based on class selctor?
0

#1

I’ve a webpage that uses Ractive js & tries to execute a script for element’s with a particular class. Please find the below sample:

<body>
<div class='container'></div>
<div class='container'>Hello</div>
<script>
    var ractive = new Ractive({
      // The `el` option can be a node, an ID, or a CSS selector.
      el: '.container',

      oncomplete: function () {
       console.log("22);
      }
    });
</script>
</body>

For the above code, I can see only one entry in the console. Why is this the case? How do I get ractive to execute the oncomplete script for all elements having container as class?