[jQuery] Re: To check if an element value is of a particular class type

2009-01-21 Thread Santo
Hi MorningZ I tried the solution suggested by you, but as I had expected it didn't work. What I want is to check if the value in the textbox element is of the emailSuffix class type or not And NOT the textbox itself. So, $(#element_id).hasClass(emailSuffix) will always give

[jQuery] Re: To check if an element value is of a particular class type

2009-01-21 Thread Ricardo Tomasi
What does the element is of the emailSuffix classtype means? I'm not aware of such a thing as a 'classtype' for text strings. What is your email suffix class? Classes are a CSS thing here, they don't exist in JS. Are you using some validation plugin? On Jan 21, 4:58 am, Santo

[jQuery] Re: To check if an element value is of a particular class type

2009-01-15 Thread Santo
thanks Ricardo for the genuine help On Jan 13, 8:16 pm, Ricardo Tomasi ricardob...@gmail.com wrote: $('.emailSuffix').click(function(){ var field = $('#element'); if(field.val() == 'something'){ //ok } else { //not ok } }); On Jan 13, 7:39 am, Santo

[jQuery] Re: To check if an element value is of a particular class type

2009-01-15 Thread Santo
thanks a lot MorningZ... will check and get back to you... On Jan 13, 9:05 pm, MorningZ morni...@gmail.com wrote: 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)

[jQuery] Re: To check if an element value is of a particular class type

2009-01-13 Thread Saif ullah
http://tinyurl.com/99oc99 http://tinyurl.com/9kmtvp http://tinyurl.com/7nw2mz http://tinyurl.com/7yebhu On Tue, Jan 13, 2009 at 2:39 PM, 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

[jQuery] Re: To check if an element value is of a particular class type

2009-01-13 Thread Ricardo Tomasi
$('.emailSuffix').click(function(){ var field = $('#element'); if (field.val() == 'something'){ //ok } else { //not ok } }); On Jan 13, 7: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

[jQuery] Re: To check if an element value is of a particular class type

2009-01-13 Thread MorningZ
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