Skip to content

$ is not a function #288

@Anke

Description

@Anke

I'm getting an error "$ is not a function in slidebars.min.js:11.32 ". I read #238 but don't really understand much of what is being said.

I'm using

<script type="text/javascript" src="assets/jquery/slidebars2.0/slidebars.min.js"></script>
<script>
( function ( $ ) {
        // Initialize Slidebars
        var controller = new slidebars();
        controller.init();

        // Toggle Slidebars
        $( '.toggle-id-1' ).on( 'click', function ( event ) {
          // Stop default action and bubbling
          event.stopPropagation();
          event.preventDefault();

          // Toggle the Slidebar with id 'id-1'
          controller.toggle( 'id-1' );
        } );
} ) ( jQuery );
</script>

with jQuery 1.11.3 and of course the respective canvas and off-canvas divs and trigger button.

What do I have to do? Any help is very much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions