Fadint链接到另一种颜色

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Fadint链接到另一种颜色相关的知识,希望对你有一定的参考价值。

  1. /* plugin */
  2. jQuery.fn.dwFadingLinks = function(settings) {
  3. settings = jQuery.extend({
  4. color: '#ff8c00',
  5. duration: 500
  6. }, settings);
  7. return this.each(function() {
  8. var original = $(this).css('color');
  9. $(this).mouseover(function() { $(this).animate({ color: settings.color },settings.duration); });
  10. $(this).mouseout(function() { $(this).animate({ color: original },settings.duration); });
  11. });
  12. };
  13.  
  14. /* usage */
  15. $(document).ready(function() {
  16. $('.fade').dwFadingLinks({
  17. color: '#008000',
  18. duration: 700
  19. });
  20. });

以上是关于Fadint链接到另一种颜色的主要内容,如果未能解决你的问题,请参考以下文章