debussy007
2010-02-09 13:30:21 UTC
Hi,
I need to check if a textarea has any other element than
p,br,b,i,strong,em,ul,li,a and img.
If it has, add the class customMarkup on the textarea EXCEPT IF any of the
above elements contain ANY attributes.
I have only the first part of the requirement, I still don't check for
attributes ...
if(
$(contentTextArea).find(':not(p,br,b,i,strong,em,u,a,img,ul,li)').length > 0
) {
$(this).addClass("customMarkup");
}
This is getting too advanced for me ... I could use some tips !
Thank you,
мэтт
I need to check if a textarea has any other element than
p,br,b,i,strong,em,ul,li,a and img.
If it has, add the class customMarkup on the textarea EXCEPT IF any of the
above elements contain ANY attributes.
I have only the first part of the requirement, I still don't check for
attributes ...
if(
$(contentTextArea).find(':not(p,br,b,i,strong,em,u,a,img,ul,li)').length > 0
) {
$(this).addClass("customMarkup");
}
This is getting too advanced for me ... I could use some tips !
Thank you,
мэтт
--
View this message in context: http://old.nabble.com/Check-if-elements-have-any-attribute---tp27515207s27240p27515207.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
View this message in context: http://old.nabble.com/Check-if-elements-have-any-attribute---tp27515207s27240p27515207.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.