In any county accepting the provisions of sections 2-221 to 2-231, bonds may be voted, or a special tax be levied, for the purchase and improvement of real estate for county fair purposes in like manner as for the building of a courthouse.