tags:

views:

50

answers:

3

hi guys, I have textboxes with textmode as multiline in my gorm.I have to apply css to that textboxes through jQuery.For that i used following script.

 $(document).ready(function() {
                $('input[type=textarea]').addClass("INPUT");

                });

Is there any syntax problem in above script.Can anybody help ?

+6  A: 

A text area isn't actually an input field. Try:

$("textarea").addClass("INPUT");

Alconja
+1  A: 

textarea is not a type of input. You can select a textarea using $('textarea')

pygorex1
+1  A: 

I assume that when you say TextBox you're referring to ASP.NET TextBox, right?

If so, a TexBox with TextMode = MultiLine is rendered an TextArea HTML element.

So you need to use $('textarea').

Paulo Santos