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

Expose doens't always work #54

Open JeffreyBouva opened 10 years ago

JeffreyBouva commented 10 years ago

I'm trying to highlight a table row, but this can't be done. Even with this bootstrap-tour fix for z-indexes: https://github.com/sorich87/bootstrap-tour/issues/166#issuecomment-32213509 (they are having the same problem)

Take a look at this fiddle: http://jsfiddle.net/DYNbj/19/

JAVASCRIPT var trip = new Trip( [{ sel: "table", content: "test 1", position: "s", expose: true, delay: 3000, }, { sel: "table tbody tr:first-of-type", content: 'Test2', delay: 3000, expose: true, position: "s" }, { sel: "table tbody tr:nth-of-type(2)", content: 'Test2', delay: 3000, expose: true, position: "s" }], { onTripChange: function (i, tripData) { //FIX FOR Z-INDEX $(tripData.sel).after($('.trip-overlay')); } }); trip.start();

HTML

Name Power Health
Superman Flying 100%
Superman Flying 100%
Superman Flying 100%
Superman Flying 100%
Superman Flying 100%
Superman Flying 100%

CSS table{ width:100%; }

table tbody tr:nth-of-type(2){ display:block; }

As you can see it won't show the (table row "tr") only if you change it's css to: display:block; But then it will lose it's style.

EragonJ commented 10 years ago

Trip.js didn't do too much on this scenario and I think this may need some extra works to make it look nice.

EragonJ commented 10 years ago

It's still worth to investigate by the way !

JeffreyBouva commented 10 years ago

@EragonJ Thanks! it's more that you know, then that is has to be fixed :+1: thanks for the reply! I will also take a look into this!