Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Как понять почему jQuery dialog медленно строит диалог на экране? / 1 сообщений из 1, страница 1 из 1
19.03.2016, 13:28
    #39195991
Nebo
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Как понять почему jQuery dialog медленно строит диалог на экране?
Диалог на основе фрейма иногда открывается быстро. Иногда очень медленно.
Запросы на сервер возвращают статус 200

Не пойму в чём дело. в JS я новичок)

Долго мучался с подключением библиотек)
Внизу функция, которая строит диалог.

Так подключил библиотеки:

Код: xml
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
        <!-- jQuery -->
	    <spring:url value="/resources/scripts/jquery-1.12.2.js" var="jquery_url" />
	    <script src="${jquery_url}" type="text/javascript"><!-- /required for FF3 and Opera --></script>	   


        <!-- jQuery UI -->	    
	    <spring:url value="/resources/scripts/jquery-ui-1.11.4.custom/jquery-ui.min.js" var="jquery_ui_url" />
     	<script src="${jquery_ui_url}" type="text/javascript"><!-- /required for FF3 and Opera --></script>

	    <spring:url value="/resources/scripts/jquery-ui-1.11.4.custom/jquery-ui.min.css" var="jquery_ui_css" />
        <link rel="stylesheet" type="text/css" media="screen" href="${jquery_ui_css}" />

	    <spring:url value="/resources/scripts/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css" var="jquery_ui_structure_css" />
        <link rel="stylesheet" type="text/css" media="screen" href="${jquery_ui_structure_css}" />

	    <spring:url value="/resources/scripts/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css" var="jquery_ui_theme_css" />
        <link rel="stylesheet" type="text/css" media="screen" href="${jquery_ui_theme_css}" />




Функция, которая строит диалог.



Код: javascript
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
function bookNewDialog() {

	var url = '<iframe id="newBookDialog" src="/stock/books?form"></iframe>';

	$(url).dialog({

		autoOpen : true,

		open : function() {

			$(this).css('width', '95%');

		},

		close : function(event, ui) {
			$(this).dialog("close");
			$("iframe#newBookDialog").remove();
		},

		height : 600,

		width : 750,

		// modal: true,

		destroy : true,

		resizable : true,

		title : "New book",

		draggable : true,

		position : [ "center" ],

		buttons : {

			"Close" : function() {
//				$(this).dialog('destroy');
				$("iframe#newBookDialog").remove();				
				
			}

		}

	});
}
...
Рейтинг: 0 / 0
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Как понять почему jQuery dialog медленно строит диалог на экране? / 1 сообщений из 1, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]