0
I’m trying to do the following, before the element gets the answer ajax opacity
from it to 0
and trigger the transition, until then this working beauty, the question is that after I pass the responseText
for the element I need to display the element again and trigger the transition, but I’m not able to make it work...
I’ve already done it with the .show
and .hide
jquery’s most wanted to do just by activating css
document.getElementById( this.element ).addEventListener(
"transitionend",
function(){
document.getElementById( this.element ).innerHTML = this.xmlhttp.responseText;
document.getElementById( this.element ).style.opacity = 1;
}, true);
document.getElementById( this.element ).style.opacity = 0;
css of the element
-webkit-transition: 200ms linear all;
-moz-transition: 200ms linear all;
transition: 200ms linear all;
// The problem is with the this
that is returning Undefined, but do not know how to solve s;
But you’re using the "transitionend" event, not the Ajax callback! Maybe the element is being displayed, only without content (empty innerHTML). Experiment with
innerHTML = '<b>Oi, Mundo!</b>'
just to test.– J. Bruni
already tested it is not changing the innerHTML
– tissei