Your problem isn't very clear.... but regardless, there is a
".hasClass" function

http://docs.jquery.com/Attributes/hasClass#class

so

$("#element_id").hasClass(emailSuffix)

would give you true/false

.
.
.

On Jan 13, 4:39 am, Santo <pujari.sant...@gmail.com> wrote:
> Hello All
>
> This is what I am trying to do. I have defined an "email suffix" class
> for a particular textbox element so that it accepts values for that
> particular class. Whenever there is a different value inserted, it
> displays a jquery error. Now, there also is an Add button which should
> add the value and display it in a widget list if it is a "valid
> value".
>
> So, I need to check and insert an if else block on the click event of
> the add button to check if the value inserted in the textbox is a
> valid email suffix type. How do I check that
>
> something like
>  if ($(#element_id).val.className == emailSuffix)
>  {
>      ...
>  }
>  else
>  {
>      ...
>  }

Reply via email to