Got exception from the expression $(this).prevAll('...')[0].innerHTML when there was no object after [0]. Avoided it with an if-clause and checked for undefined object.
Add additional, local "prev(x)" function to make code a bit more readable (lots of repeating things).
Got exception from the expression
$(this).prevAll('...')[0].innerHTML
when there was no object after[0]
. Avoided it with an if-clause and checked for undefined object.Add additional, local "prev(x)" function to make code a bit more readable (lots of repeating things).