Title: dialog does not open with javascript function
Last modified: August 31, 2016

---

# dialog does not open with javascript function

 *  Resolved [philsouza](https://wordpress.org/support/users/philsouza/)
 * (@philsouza)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dialog-does-not-open-with-javascript-function/)
 * I used the following code:
    **jQuery(document).ready(function() { jQuery(“a#openmodal”).
   click(function() { jQuery(“a#inline”).trigger(‘click’); }); }); to open the modal
   this link: `<a id="openmodal" href="#">Open Modal</a>` this error is given: “
   scripts.js:1 element query css parsed”
 * I use Jupiter Theme
 * [https://wordpress.org/plugins/modal-dialog/](https://wordpress.org/plugins/modal-dialog/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dialog-does-not-open-with-javascript-function/#post-7173431)
 * Interesting. Can you try calling open_modal_dialog() instead of clicking on the
   link? Do you have the dialog running on a site where I can see the problem live?
 *  Thread Starter [philsouza](https://wordpress.org/support/users/philsouza/)
 * (@philsouza)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dialog-does-not-open-with-javascript-function/#post-7173438)
 * Link [http://www.inffel.com/](http://www.inffel.com/)
 * Search for “Open Modal” hiperlink below first Slider.
 *  Plugin Author [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dialog-does-not-open-with-javascript-function/#post-7173441)
 * Modal Dialog is not currently enabled on your front page. Please go to the configuration
   and make sure that Show on Front Page is checked.
 *  Thread Starter [philsouza](https://wordpress.org/support/users/philsouza/)
 * (@philsouza)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dialog-does-not-open-with-javascript-function/#post-7173442)
 * ok, is not checked, but the link does not work and modal opens directly .
 *  Plugin Author [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dialog-does-not-open-with-javascript-function/#post-7173447)
 * Set the ‘Number of times to display’ to 0 so that it does not open directly. 
   As for the javascript not working, you forgot a closing ” at the end of the onClick
   code.
 * Please consider donating to support this plugin’s development.
 *  Thread Starter [philsouza](https://wordpress.org/support/users/philsouza/)
 * (@philsouza)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dialog-does-not-open-with-javascript-function/#post-7173449)
 * Yes, Work! Thanks! But I want this modal appear automatically on another website
   link .
 *  Plugin Author [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dialog-does-not-open-with-javascript-function/#post-7173450)
 * Then you should create a second modal configuration, and make that one appear
   automatically, with the same content. You would then set one as appearing on 
   the front page and check the box to only appear on specific pages, leaving the
   list of pages to appear on as empty. On the second one, you would then not check
   to appear on front page and specify which page you want it to appear on.
 *  Thread Starter [philsouza](https://wordpress.org/support/users/philsouza/)
 * (@philsouza)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dialog-does-not-open-with-javascript-function/#post-7173453)
 * Ok, Thanks! Working!
 *  Plugin Author [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dialog-does-not-open-with-javascript-function/#post-7173454)
 * Awesome! Thanks for the quick responses and please consider donating to support
   this plugin’s development.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘dialog does not open with javascript function’ is closed to new replies.

 * ![](https://ps.w.org/modal-dialog/assets/icon-256x256.jpg?rev=971132)
 * [Modal Dialog](https://wordpress.org/plugins/modal-dialog/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/modal-dialog/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/modal-dialog/)
 * [Active Topics](https://wordpress.org/support/plugin/modal-dialog/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/modal-dialog/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/modal-dialog/reviews/)

## Tags

 * [link](https://wordpress.org/support/topic-tag/link/)

 * 9 replies
 * 2 participants
 * Last reply from: [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/dialog-does-not-open-with-javascript-function/#post-7173454)
 * Status: resolved