Ok. I know this is probably pretty simple, but I am having a difficult time with it :/.
I am trying to make Divs FadeIn when they are appended to a parent div. My problem is, that when new divs are appended, all of them fade in.:
<div id="click">Click Me</div>
<div id="textResp"></div>
$('#click').live('click',function() {
$('#textResp').append("<div id='hi' class='eventdiv'>hello</div>").hide().fadeIn(3000);
});
I know that it is because the fadeIn(3000) is attached to the parent because it is starting with $(‘#textResp’), but how do you attach this to the created object?
Thanks,
Taylor
Simply create your element via a jQuery and call the
hide()andfadeIn()methods on that object and not#textRespExample on jsfiddle
Side note, I am sure this is just a generalized example, but the id should be unique.
Example on jsfiddle