.toggle is not a function : <p>In my website I have a lot of buttons. When the page loads, I need the first button to be clicked.</p>

<p>I tried getting the first button and then using the function .toggle('click').</p>

<p>var $btn = $('.btn-personalizar-tamanho')[0];
if($btn != undefined) $btn.toggle('click');</p>

<p>The console says .toggle it's not a function.</p>
