Created
April 28, 2016 19:16
-
-
Save rionmonster/8e716246a68255299d50b4401fcf07c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button class='Remove' data-id='42'>Click Me!</button> | |
<script src="https://code.jquery.com/jquery-2.1.4.js"></script> | |
<script> | |
$(function(){ | |
$('.Remove').click(function () { | |
debugger; | |
var myId = $(this).data('id'); | |
$.ajax({ | |
url: '@Url.Action("Remove", "ReadingNow")?Book_id=' + myId, | |
success: function (response) { | |
$('#myElem').html(response).fadeIn('slow'); | |
$('#myElem').delay(8000).fadeOut('slow'); | |
}, | |
failure: function (response) { | |
alert("Failure"); | |
} | |
}); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment