Language switcher is not displaying in Firefox browser with jQuery 3.3.1

Language switcher is not displaying in Firefox browser with jQuery 3.3.1

Hello,

I need your help on this, please.
I have an application with  PHP, Javascript and jQuery.
I have upgraded jQuery from 1.12 to jQuery 3.3.1 version using jQuery migrate plugin.

After upgrade the menu worked fine(as I could tested it) but now menu is appearing randomly in Chrome and non displaying at all in Firefox.

Debugging app, pausing on exceptions finds this error stack:

  1. SyntaxError: '*,:x' is not a valid selector

php code:
  1. $languageswitcher = '';
    if (LANGUAGE_SWITCH && empty($logoutontop) && !$ajax && empty($_SESSION['firstinstall']) && empty($_GET['firstinstall'])) {
    $languageswitcher = '
    <div id="languageswitcher">
    <form name="languageswitchform" method="post" action="">';
    $languageswitcher .= '
    <select name="setlanguage" onchange="document.languageswitchform.submit()">';
JS code:
  1. $('.selectpicker').selectpicker();
The menu display fine with jQuery 2.2.4 but could not downgrade it.
Could you please help me on this?

Any light on this would be very appreciated.

Thanks!