how to display 'loading' before content from jquery tabs is loaded

前端 未结 6 1523
灰色年华
灰色年华 2021-02-09 03:09

I am using jquery UI tabs and content loaded into the tab is on another page. so it is loading via ajax. There is some lag between the page loading during which the part of the

6条回答
  •  广开言路
    2021-02-09 03:35

    Best Thing I did was just this for ajax driven tabs...Hope you will love this answer

    $("#facilityTabContainer").tabs({ panelTemplate:"Loading...", selected : 0, scrollable : true, cache : false });

    and you can even modify the panelTemplate in jquery.ui.tabs also so that all the tabs in you application will automatically get the 'loading text or image'. and guess what it also solves your first tab loading problem too..

提交回复
热议问题