Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQueryUI Dialog Position and Size
- $( '<div/>' ).load( $this.attr( 'href' ) ).dialog({
- height: 'auto',
- maxWidth: 600,
- position: 'center',
- resizable: false,
- title: $this.attr( 'title' ).length > 0 ? $this.attr( 'title' ) : false,
- width: 'auto',
- resize: function( e, ui ) {
- $(this).dialog( 'option', 'position', 'center' );
- }
- });
- $( '<div/>' ).attr('id', 'my-dialog').load( 'hello.html' ).dialog({
- height: 'auto',
- maxWidth: 600,
- minWidth: 500,
- position: 'center',
- resizable: false,
- title: $this.attr( 'title' ).length > 0 ? $this.attr( 'title' ) : false,
- });
- $(window).resize(function(){
- $('#my-dialog').dialog( 'option', 'position', 'center' );
- });
Add Comment
Please, Sign In to add comment