Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using multiple jquery .dialog() with custom themes each

Status
Not open for further replies.

southbeach

Programmer
Jan 22, 2008
879
US
OK, I have this
Code:
		// Dialog Link
		$('#dialog_link2').click(function(){
                    // Dialog			
                    $('#dialog').dialog({
                        autoOpen: false,
                        width: 678,
                        height: 450,
                        classes: 'dialog-bg'
                    });
                    $('#dialog').dialog('open');
                    $('#name').focus();
                    return false;
		});
		// Log In Link
		$('#logIn').click(function(){
                    // Log In
                    $('#logInPanel').dialog({
                        autoOpen: false,
                        width: 458,
                        height: 250,
                        classes: "login-dialog-bg"
                    });
                    $('#logInPanel').dialog( "open" );
                    return false;
		});
They each are defined in CSS to use
Code:
.dialog-bg {
	background-image: url(../../css/ui-lightness/images/dialog_bg.png);
        background-repeat: no-repeat;
}
.login-dialog-bg {
	background-image: url(../../css/ui-lightness/images/nts_logIn.png);
        background-repeat: no-repeat;
}

for the life of me, they both come up with the same background and yet, the width and height properties are different.

What gives?


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Hi

Not tried it, but according to the documentation seems there should be an object :
Code:
[gray]// Dialog[/gray]
$[teal]([/teal][i][green]'#dialog'[/green][/i][teal]).[/teal][COLOR=orange]dialog[/color][teal]({[/teal]
    autoOpen[teal]:[/teal] [b]false[/b][teal],[/teal]
    width[teal]:[/teal] [purple]678[/purple][teal],[/teal]
    height[teal]:[/teal] [purple]450[/purple][teal],[/teal]
    classes[teal]:[/teal] [highlight][teal]{[/teal][/highlight]
        [highlight][i][green]'ui-dialog'[/green][/i][teal]:[/teal][/highlight] [i][green]'dialog-bg'[/green][/i]
    [highlight][teal]}[/teal][/highlight]
[teal]});[/teal]

$[teal]([/teal][i][green]'#dialog_link2'[/green][/i][teal]).[/teal][COLOR=orange]click[/color][teal]([/teal][b]function[/b][teal](){[/teal]
    $[teal]([/teal][i][green]'#dialog'[/green][/i][teal]).[/teal][COLOR=orange]dialog[/color][teal]([/teal][i][green]'open'[/green][/i][teal]);[/teal]
    $[teal]([/teal][i][green]'#name'[/green][/i][teal]).[/teal][COLOR=orange]focus[/color][teal]();[/teal]
    [b]return false[/b][teal];[/teal]
[teal]});[/teal]

Feherke.
feherke.ga
 
feherke,

I opted to use .colorbox() instead. Get the same outcome a lot simpler.

Once I opted for .colorbox(), done in 20 minutes!

Thanks,



--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top