I have an AJAX function to hide and show fields of a form in HTML. I want to add some CSS in the AJAX function.
<script>
$(function() {
$('#advo_other').hide();
$('#advocate').change(function() {
var val = $(this).val();
$('#advo_other').hide();
switch (val) {
case 'Other':
$('#advocate') // want to add css there......
$('#advo_other').show();
break;
}
});
});
</script>
and the style is below:
<style type="text/css">
.fade {
color: #CCC;
border-color:#CCC;
}
</style>