mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
effects: modified save mthod so it now only aves css atributes stored in the actual style attribute, fixes highlight
This commit is contained in:
parent
c068874890
commit
d32917596e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user