Created
May 16, 2010 19:46
-
-
Save antonevane/403110 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
def analyze = { | |
render "Content" | |
} |
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
<div id="ajax_form"> | |
<g:remoteLink action="analyze" | |
update="[success:'ajax_data',failure:'error']">Ajax Action</g:remoteLink> | |
</div> | |
<!-- Spinner Trick--> | |
<div id='spinner' class='spinner' style='display:none;'> | |
<img src='${createLinkTo(dir: 'images', file: 'spinner.gif')}' alt="Loading..." title="Loading..."/><p><g:message code="Идет загрузка.."/></p> | |
</div> | |
<div id="ajax_data"> |
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
<g:javascript src="jquery/jquery.js" /> | |
<g:javascript> | |
$(document).ready(function() { | |
$("#spinner").bind("ajaxSend", function() { | |
$(this).fadeIn(); | |
}).bind("ajaxComplete", function() { | |
$(this).fadeOut(); | |
}) | |
}); | |
</g:javascript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment