Skip to content

howto start joyride while reading a cookie, if this here is alive still #240

@hanscees

Description

@hanscees

Hi,

Its 2023 and joyride still functions with the latest jquery. Very good.
I have made a simple joyride that works fine when I use auto-start.

However, when I do not set auto start and try to start joyride after reading as cookie it fails.
I am surel;y doing something wrong. Any help apreciated.

my code:

let languagePrefer2 = localStorage.getItem('preferredLanguage');  // read cookie
        console.log('foundation says language should be', languagePrefer2);
          //only if cookie has a value
            // lets fire joyride if language is es
              if(languagePrefer2 == 'ES') {
                  console.log('language is es ');  // this works, console logs
                    } else {
                        console.log('Oh dear, language is not es ');  // this works too 
                         //   $("#chooseID").Joyride({   });
                            $(window).load(function() {
                              $("#chooseID").joyride({
                                  /* Options will go here */
                                    });
});

The error in the console is
Uncaught TypeError: $(...).joyride is not a function

As you can see I am no good programmer, just trying to get something working I dont fully understand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions