r tabs = new hx.Tabs('#tabs2');

tabs.on('change', function(data){
  hx.select('#tabs2')
    .select('.hx-tabs-content')
    .text('Tab ' + (data.id+1) + ' selected')
});

tabs.select(0, true);</script></div><div class="docs-example-code-body"><div class="example-code-section"><h3>HTML</h3><div class="qm-code-highlight-codeblock language-html"><pre><code class="qm-code-font"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"tabs2"</spa