Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Timed event only executes once
- function activateSource(id) {
- $("#confirm-activate-" + id).toggle('slow');
- $(document).on('click', '.confirm-activate', function (e) {
- e.preventDefault();
- $.ajax({
- type: "POST",
- cache: false,
- data: {
- "source-id": id
- },
- url: "modules/source/activatesource.php",
- success: function (data) {
- $("#confirmation-response").html(data);
- dismissAlert();
- }
- })
- });
- }
- function dismissAlert() {
- setTimeout(function () {
- $("#confirmation-response").hide('blind', function () {
- loadSourceContent()
- }, 500);
- }, 2500);
- }
- function dismissAlert() {
- // Show the response
- $("#confirmation-response").show( 'blind', 150 );
- // Hide the response with a timeout
- setTimeout(function () {
- $("#confirmation-response").hide('blind', function () {
- loadSourceContent()
- }, 500);
- }, 2500);
- }
Advertisement
Add Comment
Please, Sign In to add comment