Can someone please tell me what I’m doing wrong:
style:
.warning{border: 1px solid #F0AAAA; background:#FFBABA; color: #C90000;}
markup:
<p class="warning">A successful authorization already exists.
Further authorizations are not allowed at this time.</p>
script:
$().ready(function () {
alert($(".warning").html()); // WORKS
$(".warning").fadeIn(4000); // DOESN'T WORK
});
Unless the element is hidden, no fade will occur, you need something like this:
You can give it a try here, also
$()is deprecated in 1.4+, you should use$(document)or the shorter version, like this:The alternative is to give the element a
display: noneinitially but this breaks for JS-disabled users, or if JavaScript errors occur preventing the fade, so you may want to steer clear of this approach.