jQuery : popup dialog dengan jQuery

Oleh : Abah Razi

بسم الله الرحمن الرحيم

Salah satu tips untuk menampilkan dialog yang berisi URL luar dengan jQuery UI adalah dengan menggunakan iframe seperti tampak pada contoh kode berikut ini :


<button id="dialog_trigger">Open</button>

<div id="dialog" style="display:none;" title="Dialog Title">
<iframe frameborder="0" scrolling="no" width="100%" height="100%" src="http://google.about.com/"></iframe></div>

Kode jQuerynya akan tampak seperti berikut


$( "#dialog_trigger" ).click(function() {
$( "#dialog" ).dialog( "open" );
});
$("#dialog").dialog({
	overflow: 'auto',
    autoOpen: false,
    position: 'center' ,
    title: 'test',
    draggable: true,
    width : 500,
    height : 400,
    resizable : true,
    modal : false,
});

About Reza Ervani 426 Articles
Adalah pendiri programming.rezaervani.com -

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.