WordPress.org

Ready to get started?Download WordPress

Forums

[Modal Dialog] Any way to trigger from a link? (5 posts)

  1. tjbrewers
    Member
    Posted 3 years ago #

    Is there a way to trigger one of the modal dialog boxes from a link on a page or nav bar instead of just page load?

  2. Yannick Lefebvre
    Member
    Posted 3 years ago #

    Yes, this is possible. Just set Modal Dialog for manual trigger in the options, then use the following code to open it, or something along these lines.

    [code][a href="#" onClick="openDialog()" rel="nofollow"]Click here to open dialog[/a]

    [script type="text/javascript"]
    function openDialog() {
    jQuery("a#inline").trigger('click')
    }
    [/script] [/code]

    Just replace the square brackets with HTML brackets.

  3. Chris Demetriad
    Member
    Posted 2 years ago #

    Hi there,

    Where is that option to set the manual trigger? I know, it's been a while and I am trying it on WP 3.3 but still :).

    Thank you.

  4. Yannick Lefebvre
    Member
    Posted 2 years ago #

    It is on the Modal Dialog Configuration page. The exact option name is: "Set display cookies manually"

  5. Chris Demetriad
    Member
    Posted 2 years ago #

    The plugin is fantastic and your support out of this world, keep up the good work and thank you. I am now going to rate it.

Topic Closed

This topic has been closed to new replies.

About this Topic