I have a table and I'd like to fade in and out the top a开发者_JAVA技巧nd bottom borders of the table. Initially I just used css' hover feature, but I'd prefer jquery's more fancy fading. I know how to fade objects in general in and out, but haven't found any solutions for borders only.
When using jQuery UI, you can animate() the border color using code like:
$("table").animate({"border-top-color": "#ffffff", "border-bottom-color": "#ffffff"}, 800);
supposing the background color is white and moving the border color toward full white will make it disappear. Note that jQuery native animate() method doesn't work with colors, only with numeric values: you'll need animate() from jQuery UI.
精彩评论