Conditional formatting jQuery / Javascript when parsing xml seems easy, but trying to do Conditional formatting based on CONTENT with jQuery / Javascript just don't work, I mean I can't get it to work... .-)
If I want to change color of output () according to xml file content inside tag Groups
$(data).find('Kurssi:has(Group:contains("red") ---> do something ($("h3").css("color",...) $(d开发者_Python百科ata).find('Kurssi:has(Group:contains SOMETHING ELSE ---> do nothing...
This must be very simple, but I have been trying like millions of different syntaxes, with no luck
Not my brightest moment... I was trying to format something which wasn't created yet...
Much easier after the html element is created :-)
Sorry to waste your time.
精彩评论