Skip to content
Permalink
Browse files

effects: modified save mthod so it now only aves css atributes stored…

… in the actual style attribute, fixes highlight
  • Loading branch information
Paul Bakaus
Paul Bakaus committed May 31, 2008
1 parent c068874 commit d32917596eac2bbfcb5699990231b4b72c7639ec
Showing with 3 additions and 2 deletions.
  1. +1 −1 ui/source/effects.core.js
  2. +2 −1 ui/source/effects.highlight.js
@@ -5,7 +5,7 @@
$.extend($.effects, {
save: function(el, set) {
for(var i=0;i<set.length;i++) {
if(set[i] !== null) $.data(el[0], "ec.storage."+set[i], el.css(set[i]));
if(set[i] !== null) $.data(el[0], "ec.storage."+set[i], el[0].style[set[i]]);
}
},
restore: function(el, set) {
@@ -10,13 +10,14 @@
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
var color = o.options.color || "#ffff99"; // Default highlight color
var oldColor = el.css("backgroundColor");

// Adjust
$.effects.save(el, props); el.show(); // Save & Show
el.css({backgroundImage: 'none', backgroundColor: color}); // Shift

// Animation
var animation = {backgroundColor: $.data(this, "ec.storage.backgroundColor")};
var animation = {backgroundColor: oldColor };
if (mode == "hide") animation['opacity'] = 0;

// Animate

0 comments on commit d329175

Please sign in to comment.
You can’t perform that action at this time.