Let's talk about a div element:
<div id="fruit-part">
<input type="radio" name="fruits" value="apple">Apple
<input type="radio" name="fruits" value="orange">Orange
</div>
Here is the CSS that defines the border color of the div
#fruit-part {
border: 1px solid #cc3;
}
With jQuery, using $('#fruit-part').hide()
and $('#fruit-part').show()
, I can easily hide or show the content within the div
, but not the actual border line of the div.
In the example above, the div
has a border with the color "#cc3". I'm curious, how can we use jQuery to also hide or show the border of the div?