The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I have a table that is generated by a wordpress plugin. And the writers change it constantly.
Is there anyway to say “If this TD contains a number between 4 and 8 apply this CSS class to it.”
Sure, jQuery has addClass and removeClass. Combined with some more JS you could switch classes with that.
I don’t think JQ can natively compare numbers…but probably with raw JS?
I did a quick search in SO and came up with
which seems bang on point.
Thanks that works perfect when I built it on SO. However when I move it to the site it is not working.
Nevermind, worked when I moved it to the footer.