Показать сообщение отдельно
  #12 (permalink)  
Старый 20.08.2012, 22:17
sinistral
Посмотреть профиль Найти все сообщения от melky
 
Регистрация: 28.03.2011
Сообщений: 5,418

для начала обновите jQuery.
потом пробните так, должно работать.
$(document).ready(function () {
	// ставим ссылки
	$("body").on("click", "a.pr", function () {
		$(".body").css("overflow", "hidden");
		var pid = $(this).attr("id");
		var link = $(this).attr("href");
		$(".body2").show();
		$(".photo-load").show();
		//$(".rcontent").html("Загрузка..."); 

		photocontent(link, pid);
		return false;
	});

	function photocontent(link, pid) {
		$.ajax({
			type: 'POST',
			url: link,
			data: {
				pid: "pid"
			},
			success: function (data) {
				$(".rcontent").html(data + "<div class='photo-load'></div>");
				window.location.hash = "photo_" + pid;
				$(".body2").css("height", $(document).height()).show();
				$(".photo-load").hide();
				//alert("ok");
			},
			error: function (xhr, textStatus, error) {
				$(".rcontent").html(xhr.statusText);
			}
		});


	};
});

Последний раз редактировалось melky, 20.08.2012 в 22:20.
Ответить с цитированием