Не срабатывает триггер при клике на ссылку. Хотя в списке язык выбирается. Как правильно это сделать?
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Google Translation</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement(
{
pageLanguage: 'en',
includedLanguages: 'ru',
},
'google_translate_element'
);
}
</script>
<script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit" type="text/javascript"></script>
</head>
<body>
<!-- Code provided by Google -->
<div id="google_translate_element"></div>
<!-- Use CSS to replace link text with flag icons -->
<ul class="translation-links">
<li><a href="#" class="spanish" data-lang="ru">Русский</a></li>
</ul>
<!-- Flag click handler -->
<script type="text/javascript">
$('.translation-links a').click(function() {
$('select').val('ru').trigger('click');
});
</script>
<p>Women Are Making the Best Rock Music Today: Listen Now
Guitars may seem to matter less than ever. But just beneath the mainstream, dozens of female bands are making some of the most acclaimed, urgent, politically relevant music around.</p>
</body>
</html>