I am reading the code of a plugin and trying to learn from it, but found something I don't understand:
Why is the author setting the visibility of select, embed and object to "hidden" in the start
function and then resetting them to "visible" in the end
function? The logic of the plugin doesn't deal with any of these tags, it is a lightbox plugin which attaches events to div
and img
elements.
$('select, object, embed').css({
visibility: "hidden"
});
https://github.com/lokesh/lightbox2/blob/master/js/lightbox.js#L126
Then after:
$('select, object, embed').css({
visibility: "visible"
});
I don't have any tags of these kinds on my website and I don't understand why a plugin user would have to hide these elements even if they had them.
Why is the plugin doing this?
Answer: Comment of A.Wolff