Skip to content

Frequently asked questions

EragonJ edited this page Jun 23, 2014 · 1 revision

What is "Error: Your tripData is not valid at index: 0" and how to fix this ?

You may get this error if your tripData is not valid and here comes the rules (May get changed):

  1. no content field
  2. no sel field
  3. with sel field, and its type is jQuery Object but can't match any existent element in DOM tree
  4. But if your tripData has some specialDirections, then you will automatically pass above rules. (Because you may just want to put some String on the top-right screen without sel field)

And also, if you want to select an element which is not existent in the DOM tree when initializing Trip.js, you can put the selector (in String type which jQuery Sizzle can recognize) points to that element, and when the we are at that step, Trip.js will use that selector to match the element.

keep updating ...