Thanks for the vote of confidence Arie. My demo has an issue in that, if you dismiss the descriptions, and then get them back, their auto height adjustment no longer works as intended. Also, once you dismiss them, the button for bringing them back (restore button) gets stuck in whatever location it was in, regardless of how wide or narrow the images are in subsequent slides. I think I can address both of those fairly easily. I'm also noticing today that the change in width of the descriptions could be smoother perhaps.
I think what you're saying about overriding style is flawed*. However, the script originally (a long time ago) allowed the user to configure the background as part of the options. I'm not sure why DD removed that. I guess he just liked black? Or he got tired of people trying to make it transparent? No idea really. I think it should be left out of the script entirely, so that it's easily controlled in the stylesheet without needing the !important keyword.
* It's true - your example with the body. But that's different. That's javascript overriding inline style, javascript always wins that battle as long as it executes after the browser has parsed the inline style. But the reason why .gallerylayer !important overrides don't work with this script is that it's also the wrapper div. so there are three divs that have the black background. One wrapper, which is accessed via it's id and the two layers, accessible via their common class name:
Code:
#fadeshow1, #fadeshow1 .gallerylayer {
background-color: transparent !important;
transition: opacity 2.5s;
}
These cannot be overridden using the sort of javascript that the Ultimate Fade-In script uses**. But again, ideally I would say that it should have no background in the script. The user should be free to set that in the css without needing the !important keyword.
** They can be overridden with a subsequent !important keyword declaration in a javascript created and inserted (or simply in a normal) stylesheet, or by accessing the sheet via javascript and removing or changing the declarations, and perhaps by injecting an !important declaration inline via javascript. But U-Fade doesn't do any of that.
Bookmarks