im trying to use jquery inside a server-side function, but it seems not to work