Minor jQuery DOM traversal tuning

Reduce scope of DOM traversal to find $prev by filtering result of
$trigger.  Optimistically cache and reuse result of DOM traversal to
locate visibleClass.