I sometimes highlight a div that originally has no background colour. The current Effect.Highlight will leave my div with a white background, and it was not quite right for my purposes. My one-line-patch is simply to add the afterFinish option if there is no current background colour (insert at line 268 of effects.js rev:1756) if ( !current ) options.afterFinish = function(effect){ effect.element.style.backgroundColor = ''''; }; I don''t know if there needs to be a check for an existing afterFinish option? -- Rob Wills
Have you checked out the latest trunk version on this? http://dev.rubyonrails.org/file/spinoffs/scriptaculous/src/effects.js It should do what you want. :) Thomas Am 08.07.2005 um 08:26 schrieb Rob Wills:> I sometimes highlight a div that originally has no background colour. > > The current Effect.Highlight will leave my div with a white > background, and it was not quite right for my purposes. > > My one-line-patch is simply to add the afterFinish option if there is > no current background colour (insert at line 268 of effects.js > rev:1756) > > if ( !current ) options.afterFinish = function(effect){ > effect.element.style.backgroundColor = ''''; }; > > I don''t know if there needs to be a check for an existing > afterFinish option? > > -- > Rob Wills > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Seemingly Similar Threads
- question about Effect.Highlight and IE 5.5
- Migration of Effect from 1.4.0 to 1.5.1
- RE: Question about event listener highlighting withchild elements
- stopping effects, help me again please
- Ajax.PeriodicalUpdater using Effect.Highlight to highlight newly loaded div