RSS 피드의 링크를 대화 상자로 열려고합니다. 나는 here에서 얻은 다음 코드를 시도하고있다. 링크가 대화 상자를 열지 않습니다. 내가 뭘 잘못하고 있는지 제안 해. 감사jQuery UI 대화 상자에서 동적 링크로드
$(document).ready(function() {
$('a#URLLoad').live('click', function(e) {
e.preventDefault();
var page = $(this).attr("href")
var pagetitle = $(this).attr("title")
var $dialog = $('<div></div>')
.html('<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>')
.dialog({
autoOpen: false,
modal: true,
height: 625,
width: 500,
title: pagetitle
});
$dialog.dialog('open');
});
});
<li class="ui-state-default">
<a class="URLLoad" href="http://feeds.arstechnica.com/~r/arstechnica/index/~3/4UlQiQB2n54/">New Xbox interface brings Windows 8 "Metro" style to the console</a></li>
UPDATE :http://jsfiddle.net/daxnp/
가 JQuery와 UI의 참조 및 CSS를 포함하지 않은 것으로 생각하는 모양이 업데이트 한 [나는 그것을 구조화하는 다른 방법을 제안 할 수 있습니까? (http://jsfiddle.net/3E6Vp/). 또한 autoOpen이 생성 직후에 바로 호출하는 것을 막을 이유는 불필요한 중복입니다. – Ohgodwhy
잘 작동합니다. 여기에 피들 http://jsfiddle.net/zQdb4/1/ –
나를 위해 didnt 일 – jsp