2010-01-10 136 views
3

我想要动画的背景颜色,颜色和边框颜色更改与jquery但由于某种原因边框颜色不会改变任何想法为什么?这里是jQuery代码的部分:边框颜色不会改变

$('#tabbed a').hover(function() { 
     $(this).animate({ 
      backgroundColor: "#FBFBFB", 
      color:"#FD7A24", 
      borderColor:"#000" 
     }, "fast") 
     }, function() { 
     $(this).animate({ 
      backgroundColor: "#FFF", 
      color:"#65B1D3", 
      borderColor:"#eee" 
     }, "fast") 
     }); 

谢谢

回答

4

jQuery Color Plugin不支持只是borderColor。您需要提供所有四边:

$('#tabbed a').hover(function() { 
    $(this).animate({ 
     backgroundColor: "#FBFBFB", 
     color:"#FD7A24", 
     borderLeftColor: "#000", 
     borderTopColor: "#000", 
     borderRightColor: "#000", 
     borderBottomColor:"#000" 
    }, "fast") 
    }, function() { 
    $(this).animate({ 
     backgroundColor: "#FFF", 
     color:"#65B1D3", 
     borderLeftColor: "#eee", 
     borderTopColor: "#eee", 
     borderRightColor: "#eee", 
     borderBottomColor:"#eee" 
    }, "fast") 
    }); 

您可以从line 10 of the source看到它可以激活该属性:

...['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor']...