Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-21-2012, 07:59 PM   PM User | #1
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
Question Dialogue on link/button click instead of page load?

Hello,

I'd like to do the same as what is in my example link apart from having a link/button to open up the dialogue rather than it opening up on a page load.

Example: http://tornhq.com/modal.html

Best Regards,
Tim
MrTIMarshall is offline   Reply With Quote
Old 08-21-2012, 09:59 PM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
One way, assuming you have a button with id 'somebutton':

Code:
$('#somebutton').click( function () {
    $( "#dialog-modal" ).dialog({
        height: 140,
        modal: true
    });
});
However, I assume that this jquery-dialog plug-in will offer an alternative way to do this.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Users who have thanked AndrewGSW for this post:
MrTIMarshall (08-22-2012)
Old 08-22-2012, 11:06 AM   PM User | #3
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
Thank you Andrew!

I thought it would already have on in the library, however, I could not find one anywhere.

Best Regards,
Tim
MrTIMarshall is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:08 PM.


Advertisement
Log in to turn off these ads.