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, {
|
$.extend($.effects, {
|
||||||
save: function(el, set) {
|
save: function(el, set) {
|
||||||
for(var i=0;i<set.length;i++) {
|
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) {
|
restore: function(el, set) {
|
||||||
|
@ -10,13 +10,14 @@
|
|||||||
// Set options
|
// Set options
|
||||||
var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
|
var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
|
||||||
var color = o.options.color || "#ffff99"; // Default highlight color
|
var color = o.options.color || "#ffff99"; // Default highlight color
|
||||||
|
var oldColor = el.css("backgroundColor");
|
||||||
|
|
||||||
// Adjust
|
// Adjust
|
||||||
$.effects.save(el, props); el.show(); // Save & Show
|
$.effects.save(el, props); el.show(); // Save & Show
|
||||||
el.css({backgroundImage: 'none', backgroundColor: color}); // Shift
|
el.css({backgroundImage: 'none', backgroundColor: color}); // Shift
|
||||||
|
|
||||||
// Animation
|
// Animation
|
||||||
var animation = {backgroundColor: $.data(this, "ec.storage.backgroundColor")};
|
var animation = {backgroundColor: oldColor };
|
||||||
if (mode == "hide") animation['opacity'] = 0;
|
if (mode == "hide") animation['opacity'] = 0;
|
||||||
|
|
||||||
// Animate
|
// Animate
|
||||||
|
Loading…
Reference in New Issue
Block a user