figured it out. the plugin doesn’t support this directly, so i had to hack the hell out of it. Basically what I’m doing is rather than trying to trigger the modal with javascript, I am creating a hidden div with the modal html code and then using jQuery to clone html code (with events) and move it where I wanted.
first i added an action to wp_footer in my theme’s functions php that outputted a hidden div with an actual link calling the modal:
functions.php
————-
add_action( ‘wp_footer’, ‘my_modal_code’ );
public function my_modal_code()
{
?>
<div style=”display:none;” id=”my_modal_code”>
Open Modal
</div>
<?
}
Next I used jQuery to clone (with events) and move the html code where I want it.
sc = jQuery(‘#my_modal_code’).clone(true);
jQuery(‘#my_modal_code’).remove();
jQuery(‘p’).prepend( sc.show() );