Giter Site home page Giter Site logo

Comments (10)

valnub avatar valnub commented on June 2, 2024 1

It's not your fault. There was an incompatibility issue with swipeable tabs which are a new component in F7.

I fixed the bug in the latest version of welcomescreen.js: https://github.com/valnub/Framework7-Plugin-Welcomescreen/blob/master/welcomescreen.js

Update to this new version and it should work.

from framework7-plugin-welcomescreen.

valnub avatar valnub commented on June 2, 2024 1

Ah, ok. I found the problem. Has nothing to do with swipeable tabs.

That "end tutorial" button is not part of this lib. Thus, you have to attach an event listener for it on your own.

See in the example code, there you will find something like this:

$$(document).on('click', '.tutorial-close-btn', function () {
  welcomescreen.close();
});

I would not recommend to add .close-welcomescreen class to that button as it is intended for the "skip" button only.

from framework7-plugin-welcomescreen.

valnub avatar valnub commented on June 2, 2024

Can you provide a runnable example of your code with jsfiddle? Your code looks ok so far, so there must be a mistake somewhere else.

from framework7-plugin-welcomescreen.

stileinverso avatar stileinverso commented on June 2, 2024

Here the (incomplete) code but the error is still there:

http://www.stileinverso.it/demo/welcomescreen/www.zip

I found why the error occours: I use swipeable tabs in main view!

If you run the code and click "Skip" or "End tutorial" -> Error!
Now try to change this in the HTML code (line 38):

<div class="tabs-swipeable-wrap">

With this:

<div class="">

And the error goes away, your plugin works but that class is required like the docs says here:
http://framework7.io/docs/tabs.html#swipeable-tabs

I don't understand :-/

from framework7-plugin-welcomescreen.

stileinverso avatar stileinverso commented on June 2, 2024

Hi, valnub!
With your update the problem is been solved.
However I had to change this code:

{
  id: 'slide3',
  picture: '<div class="tutorialicon">☆</div>',
  text: 'Thanks for reading! Enjoy this app.<br><br><a id="tutorial-close-btn" href="#">End Tutorial</a>'
}

With this:

{
  id: 'slide3',
  picture: '<div class="tutorialicon">☆</div>',
  text: 'Thanks for reading! Enjoy this app.<br><br><a href="#" class="link color-white close-welcomescreen">End Tutorial</a>'
}

I.E.: <a id="tutorial-close-btn" href="#">End Tutorial</a> -> <a href="#" class="link color-white close-welcomescreen">End Tutorial</a>

I hope I've done in a correct way, otherwise please tell me where I'm wrong.
I hope it could be useful for other people!

Thank again!

from framework7-plugin-welcomescreen.

valnub avatar valnub commented on June 2, 2024

Hi, why did you have the HTML markup? I only updated the welcomescreen.js file and that worked for me

from framework7-plugin-welcomescreen.

stileinverso avatar stileinverso commented on June 2, 2024

Sorry, I forgot to tell you the reason why I modified that HTML code.
The "Skip" button works, but the "End tutorial" not with the original code!
Can you test it?

from framework7-plugin-welcomescreen.

valnub avatar valnub commented on June 2, 2024

Hm, that's very weird because in the example from this repo it works https://github.com/valnub/Framework7-Plugin-Welcomescreen/tree/master/example

from framework7-plugin-welcomescreen.

stileinverso avatar stileinverso commented on June 2, 2024

Yes, it works if you don't use swipeable tabs from main view!

from framework7-plugin-welcomescreen.

stileinverso avatar stileinverso commented on June 2, 2024

Ok, problem solved!
Thanks!!

from framework7-plugin-welcomescreen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.