Fix: wasn't working for jquery 1.8.3