layervault / jquery.typer.js

A simple jQuery plugin for a slick typing effect.
745 stars 103 forks source link

Text color is dark in Firefox #4

Open namzo opened 11 years ago

namzo commented 11 years ago

The color of the background & text are the same in Firefox. I tested on Firefox 18.0 on Mac.

kontur commented 11 years ago

Can you post a jsfiddle or other online example showing that behaviour in a repeatable way?

spaceninja commented 10 years ago

You can see the issue on the typer.js demo page: http://cosmos.layervault.com/typer-js.html

Note this only happens in Firefox -- Chrome, Safari, and IE all work as expected, but in FF, the highlighted string is a solid block of color, instead of reversing the text.

screen shot 2014-03-19 at 1 49 06 pm

vpugh commented 10 years ago

Set textColor to a value instead of leaving at null. This worked for me.

sasindu555 commented 8 years ago
spanWithColor = function(color, backgroundColor) {
    if (color === 'rgba(0, 0, 0, 0)') {
      color = 'rgb(255, 255, 255)';
    }

    return $('<span></span>')
      //.css('color', color)
      .css('color', 'rgb(255, 255, 255)')
      .css('background-color', 'rgb(255, 190, 76)');
  };

Use this .css('color', 'rgb(255, 255, 255)') instead of .css('color', color)