in my css i've set some elements visibiliy:hidden, how can I show them?
I've done it before with opacity, but i've some bug in IE:
var i = 0;
$mySelection.each(function(i) {
$(this).delay((i * 100) + ($mySelection.length)).animate(
{ opacity: "1"},
{queue:true, duration:1000, easing:"quartEaseIn"}
);
})
How can i do if I want controll visibility with jQuery instead of opacity? thank you
Answer: Use the jQuery :visible Selector You can use the jQuery :visible selector to check whether an element is visible in the layout or not. This selector will also select the elements with visibility: hidden; or opacity: 0; , because they preserve space in the layout even they are not visible to the eye.
visible = function() { return this. each(function() { $(this). css("visibility", "visible"); }); }; }(jQuery));
No. An element such as a hyperlink can't be clicked (and the link followed) if the visibility is set to hidden.
$(":hidden").css("visibility", "visible");
Rather than using visibility: hidden
, use display:none
, then if you want to fade in your hidden element use fadeIn. For example:
$("div:hidden").fadeIn("slow");
Edit: Given that you want to use visibility, try this:
var i = 0;
$mySelection.each(function(i) {
$(this).delay((i * 100) + ($mySelection.length)).css(
{ 'opacity': '0', 'visibility': 'visible'}).animate(
{ opacity: "1"},
{queue:true, duration:1000, easing:"quartEaseIn"});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With