Change trigger to onchange from onclick