change the jquery to use a dynamic action variable instead of hard code