Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Nov 2010
    Posts
    390
    Thanks
    48
    Thanked 1 Time in 1 Post

    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

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    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

  • Users who have thanked AndrewGSW for this post:

    MrTIMarshall (08-22-2012)

  • #3
    Regular Coder
    Join Date
    Nov 2010
    Posts
    390
    Thanks
    48
    Thanked 1 Time in 1 Post
    Thank you Andrew!

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

    Best Regards,
    Tim


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •