Want to make first Option auto selected in Gallery

This is the gallery page: http://www.divi.comunify.cc/excercises/

The requirement is, when the page loads, the first option (“Arms” in this page) will be auto selected.

This code is working in browser console, but not in mu plugins:

add_action( 'wp_footer', 'make_arms_selected' );
function make_arms_selected() {
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".et_pb_portfolio_filters.clearfix ul li:nth-child(1) a").addClass("active").click();

What could be the solution for this?