Why won't my jquery work -
i have more code important bit. rest of js function , styling.
<button onclick="gb()" id="gb"> clickme</button> <script src="jquery-1.12.2.min.js"> $( document ).ready(function() { $('button').eq(0).trigger('click'); };
you can't mix <script>
tag src
and inner script. make 2 tags
<script src="jquery-1.12.2.min.js"></script> <script> // script </script>
also, check console while developing. point out errors you.