2010-01-10 7 views
3

J'essaye d'animer la couleur de fond, la couleur et la couleur de la bordure pour changer avec jquery mais pour une raison quelconque, la couleur de la bordure ne change pas d'idée pourquoi? voici la partie du code jquery:la couleur de la bordure ne changera pas

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

Merci

Répondre

4

Le jQuery Color Plugin ne supporte pas seulement borderColor. Vous devez fournir les quatre côtés:

$('#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") 
    }); 

Vous pouvez voir line 10 of the source les propriétés, il peut animer:

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