I ‘m trying to open the links from an RSS feed into a dialog. I am trying the following code which I got from here. The link does not open dialog. Any suggestions what I ‘m doing wrong.
thanks
$(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/
you are using class not id change your code like this
you need to change
$('a#URLLoad')to$('a.URLLoad')Update:
i have updated your fiddle have a look here Demo
i think problem is that you have not included reference of jquery UI and css