<div class="content" id="current">
<div id="loader" style="display:none;"><img src="/images/loader.gif" alt="" /></div>
</div>
I have this code. Above, which is a Box, and on submitting a button, I want a loader image there then when i get the response back, i want the image that s in the response to fadeIn.
When i click submit, I dont see the loader and I dont see the image replacing into #current.
$('#Submit').click(function (e) {
$('#error').html("");
e.preventDefault();
code = $('#Code').val(),
$('#loader').show();
$.post('/home/foo/', { code: code },
function (data) {
$('#loader').hide();
alert(currentItem.ItemImage);
$('#current').html(currentItem.ItemImage);
How can i fix this?
What am i doing wrong?
I’m thinking you need a semicolon after this line, not a comma:
to