Wire next/previous with jquery rather than through onclick attribute