I am seeking assistance in changing the font of text using classes. I have multiple texts with different classes and I want to be able to edit all the texts without adding another dropdown menu. I believe that the change needs to occur in a script. Please help me.
$("#fs").change(function() {
//alert($(this).val());
$('.boy').css("font-family", $(this).val());
});
$("#size").change(function() {
$('.boy').css("font-size", $(this).val() + "px");
});
<div id="something" class="boy">hello world</div>
<div id="something1" class="boy1">hello world</div>
<div id="something2" class="boy2">hello world</div>
<form method="post" action="<?php echo $PHP_SELF;?>">
<select id="fs">
<option value="Agency FB">Agency FB</option>
<option value="Algerian">Algerian</option>
<option value="AR Berkley">AR Berkley</option>
<option value="AR Blanca">AR Blanca</option>
<option value="AR Bonnie">AR Bonnie</option>
<option value="AR Carter">AR Carter</option>
</select>
<select id="size">
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="18">18</option>
<option value="20">20</option>
<option value="22">22</option>
<option value="24">24</option>
</select>
</form>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">