Vote count:
0
I want to include a link to the data-on
and data-off
attributes so I can switch the website's idiom with a single click using a toggle. Have tried a script but no luck so far.
HTML:
<input id ="toggle" data-toggle="toggle" data-on="English" data-off="Spanish" type="checkbox">
JS:
<script>
function toggleEventInput() {
$("#toggle").attr('data-on').html('<a href="/language/en"></a>');
$("#toggle").attr('data-off').html('<a href="/language/es"></a>');
}
</script>
TIA
asked 39 secs ago
HTML :: Add links to input tags
Aucun commentaire:
Enregistrer un commentaire