Using Html Tag In Jquery Ui Dialog
I'm Using Jquery Ui Dialog and have problem setting text. I'm using this code to insert a link: $('#dialog').text(Click Here).dialog(); But it show
Solution 1:
when you use text , you exactly tell the jquery ui core to treat that string as a text. You can simply use HTML like this :
$('#dialog').html('<a href="#" >Click Here</a>').dialog();
Solution 2:
try this:
$("<a href=\"#\" >Click Here</a>").appendTo('body').dialog();
Solution 3:
The issue here is that you're using the text
function, which is just for text as it escapes characters needed for valid HTML.
You should instead be using the html
function, with it your working code would be:
$('#dialog').html("<a href=\"\">Click Here</a>").dialog();
Solution 4:
Check http://jqueryui.com/dialog/ The place where the text appears is:
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
And in the documentation (http://api.jqueryui.com/dialog/) there is no .text as function
Post a Comment for "Using Html Tag In Jquery Ui Dialog"