Reputation: 55
I use an ajax call to retrieve a div that I want to prepend to my results DIV. I don't want to add the style display:none to the div before it is returned because I use the same code elsewhere and don't want that style attached.
That being said how do I prepend an element to a div already hidden so I could use the fadeIn or slideIn function.
Here is what I have so far:
$('#results').prepend(singleresult);
singleresult contains a div with the result.
How do I make singleresult hidden before I prepend it so I can use a fancy automation function to get it to show?
Upvotes: 0
Views: 827
Reputation: 15985
add a class to this div and do this css .myPrependDiv {display:none;}
or just use .ajaxDivHolder div{display:none}
after that the jquery fadein or slidein function will overwrite it.
Upvotes: 2