29
rated 0 times
[
34]
[
5]
/ answers: 1 / hits: 5465
/ 10 Years ago, wed, april 16, 2014, 12:00:00
Hey so I have a div that I want to replaceWith some text after clicking on the button and then re-show the same hidden text after 5 seconds. I am stuck on the part where I need to re-show it. I hid the div with the onclick function and appended some text but after a couple seconds I would like to re-show the original text.
here is the link that I need to change text onclick and then after 5 seconds show the ORIGINAL text...
originally the text says add to calendar, upon clicking it, it should change to calendar updated and then after 5 seconds change back to add to calendar.
<div class=resSubmitAction download resDetailsButton>
<a href=javascript:void(0);>
</div>
<div class=calText><p>add to calendar</p></div></a>
</div>
Jquery:
$(document).ready(function () {
$(.resSubmitAction).click(function () {
$(.calText > p).replaceWith(Calendar Updated);
});
});
More From » jquery