EragonJ / Trip.js

🚀 Trip.js is a plugin that can help you customize a tutorial trip easily with more flexibilities.
https://eragonj.github.io/Trip.js/
MIT License
793 stars 109 forks source link

onTripStart event is not firing #58

Closed donpinkus closed 10 years ago

donpinkus commented 10 years ago

First of all, this is the best intro library I've seen. So solid job building a clean intro!

The issue I'm having is that the onTripStart event isn't firing for me. Syntax error or bug?

var trip = new Trip([
    { 
      sel : $('.cm-variable'),
      content : 'Double click to do something.',
      delay: -1,
      position: "n",
      animation: 'fadeInUp',
      onTripStart: function(tripIndex) {
          console.log('hello');
      }
    }
]);

trip.start();
EragonJ commented 10 years ago

If you want to use local event like this, you have to make sure your version is >= 2.0.0 because this is a new feature.

You can check demo6 for more information here

EragonJ commented 10 years ago

If this is the root cause to make it broken, I would try to add more clear information on documentations.

EragonJ commented 10 years ago

@donpinkus hope this information helps :)

donpinkus commented 10 years ago

Works with the new version :)

EragonJ commented 10 years ago

@donpinkus I am glad this helps ! :smile: