fixed #10, old code no longer worked.  Updated to use jQuery method