trying jquery factorisation