I would advise to use the scripts:
$(.txt).addClass("withBorder");
$(.txt).removeClass("withBorder");
Your ".txt" CSS class should be without the borders, and the class "withBorder" (should be named like that, without '.'), should define some border. This way, you can switch between bordered and non-bordered style leaving the rest of styles the same, using the JavaScript lines shown above.
Please see:
http://api.jquery.com/category/css/[
^].
The problem could by somewhere else. For example, the selector ".txt" should be in quotation marks and the class with such names should exist in styles you are using. Do you have this class? There could be something else — your sample is incomplete.
Please see:
http://api.jquery.com/class-selector/[
^].
And pay attention for my comment to the question, if you want to avoid frustration and lost time.
—SA