Border color will not change

I am trying to animate the background color, colors and borders for a change using jquery, but for some reason the border color does not change any idea why? here is the jquery code part:

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

thank

+3
source share
1 answer

jQuery Color Plugin does not support only borderColor. You need to put all four sides:

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

You can see from the line 10source whose properties it can animate:

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

Source: https://habr.com/ru/post/1727906/


All Articles