yemM / flippy

Flippy is a cross-browser flip effect plugin for jQuery which allows you to flip whatever html element you want. It now supports rgba colors
140 stars 98 forks source link

A few improvements and big fixes to allow the plugin to work with IE and FF #7

Closed andrevinsky closed 11 years ago

andrevinsky commented 11 years ago
  1. Introduction of undefined parameter to allow direct comparison
  2. Nicety: a use of $.proxy() to eliminate use of the that var
  3. _Axis is supplied with the var keyword (to prevent global scope pollution)
  4. .convertColor() function rewritten to eliminate use of eval() AND consider transparent value of a color
  5. If initial bg-color is transparent alpha is set to 0, and color - to #ffffff
  6. Color calculation in init goes without eval now (there's no eval() now in Flippy)
andrevinsky commented 11 years ago

This set of fixes has become the necessary measure to enable the plugin to work in our project under FireFox and IE (10).

Several js-errors that prevented functioning in the said browsers were due to the eval()-related bugs, uses of undefined variables, and scoping.

andrevinsky commented 11 years ago

Changes in line #678: if we assume the opts.verso is jQuery object it makes sense to pass it as-is.

See, the call to .html() method only narrows the types of content which can be passed on to the plugin to.. text.

In fact, gotten rid of .html(), we now can pass anything the jQuery .append() method can handle (primarily another jQuery object and not a simple HTML markup). A possibly deep-cloned DOM object WITH events hooked to it? Hmm. It allows us to interact with the verso side.