mvc3 Ajax.ActionLink and delaying LoadingElementId from showing

后端 未结 1 428
执念已碎
执念已碎 2021-01-21 17:15

I have a progress div which absolute positions across the top of the web page.

When I click on a Ajax.ActionLink, sometimes I see it flicker at the top when the request/

相关标签:
1条回答
  • 2021-01-21 17:32

    You will need to handle this yourself.

    Rather than specifying a AjaxOptions.LoadingElementId you can handle the showing/hiding of your loading element by specifying functions for the OnBegin (show it) and OnComplete (hide it) events.

    See http://msdn.microsoft.com/en-us/library/dd460351.aspx for more details on AjaxOptions.

    There are a few ways of creating the delay - see How to wait 5 seconds with jQuery?

    And here's an example that does it with jQuery - delay the showing of a ajax loading gif using jQuery

    0 讨论(0)
提交回复
热议问题