Solution using jQuery