Costs may be allowed on a motion, in the discretion of the court or judge, not exceeding $300, and may be absolute or directed to abide the event of the action.