I have a little problem with the following piece of code:
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("select").change(function(){
$(this).find("option:selected").each(function(){
var val = $(this).attr("value");
if(val){
$(".place").not("." + val).hide();
$("." + val).show();
} else{
$(".place").hide();
}
});
}).change();
});
</script>
I want to adapt the code because there is a value that has spaces in it and so it doesn't work for this one. The value that doesn't work has 2 spaces in it: "Garantie Jeunes (Antibes)" (that's the exact name). The other values have no spaces.
<select tabindex="" id="Antenne" name="Antenne" class="fusion-form-input" data-holds-private-data="false">
<option value="Antibes">Antibes</option>
<option value="Biot">Biot</option>
<option value="Châteauneuf-Grasse">Châteauneuf-Grasse</option>
<option value="Garantie Jeunes (Antibes)">Garantie Jeunes (Antibes)</option>
<option value="Valbonne">Valbonne</option><option value="Vallauris">Vallauris</option>
<option value="Villeneuve-Loubet">Villeneuve-Loubet</option></select>