This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

AdventureStudio
AdventureStudio

Hello Everyone,

Translate isn't working right I get the Error "framework.js:274 Uncaught TypeError: $.ajax is not a function" If I want to change language through ajax. Website: https://adventure-studio.net Links are at the bottom.

My Markup looks like that:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">

        <link href="https://fonts.googleapis.com/css?family=Bitter|Lato" rel="stylesheet">

        {% styles %}

                <link href="{{ [
            'assets/vendor/bootstrap.min.css',
            'assets/css/fonts.css',
            'assets/css/style.css',
            'assets/css/responsive.css'
        ]|theme }}" rel="stylesheet">

        {% scripts %}

    </head>
    <body {% if this.page.id == 'services' %}data-spy="scroll" data-target=".navbar-secondary" data-offset="50"{% endif %}>

        {% partial 'header' %}

        {% page %}

        {% partial 'footer' %}

                <script src="{{ [
            'assets/vendor/jquery-3.1.1.slim.min.js',
            'assets/vendor/bootstrap.min.js'
        ]|theme }}"></script>

        {% framework extras %}

    </body>
</html>
JeffGoldblum
JeffGoldblum

The slim version of jQuery does not include the AJAX or effects modules, so use a different version of jQuery that does include at least the AJAX modules. Read the release notes on their website for more information.

AdventureStudio
AdventureStudio

Now clicking works but he displays "AJAX handler 'onSwitchLocale' was not found."

Maybe I should put the {% scripts %} behind the Framework tag?

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.