SimpleModal Login
Call simplemodal-login from another plugin (5 posts)

  1. gambinaut
    Posted 3 years ago #

    Hi Eric,

    First, I'd like to thank you for creating simplemodal login. Right now I'm using version 1.0.6, and it's a great plugin. I just have a one question: how can I run simple modal login from inside a plugin that I'm developing? I've seen various threads that have asked similar questions, and none of the solutions in those threads have worked for me. I'd imagine that this is because simplemodal login has changed in the past year.

    I've tried variations of this:

    but nothing happens. I'm otherwise able to use javascript in my plugin, but for some reason that code doesn't seem to run simplemodal login. Do you know of some other way I can call simplemodal-login from my plugin? I apologize in advance if I'm making some obvious mistake - I'm very new to wordpress, PHP, and javascript. Anyway, thanks!


  2. totels
    Posted 3 years ago #


    All work for me, you may have a context issue if you are trying to call it from someplace where jQuery or SimpleModal are not yet loaded.

  3. gambinaut
    Posted 3 years ago #

    You're probably right. If there is a context issue, how would I address it?

    I apologize if these questions seem trivial - I'm very new to coding in PHP and javascript and using wordpress.

  4. gambinaut
    Posted 3 years ago #

    This was my naive solution to the context issue, which didn't work:

    $(document).ready(function () {

    Does simplemodal-login load last or something along those lines?

  5. totels
    Posted 3 years ago #

    If you can't call it from a document ready it's possibly something else not loading at all. I find that my best friend is console.log(<data>).

    For this particular problem though, you should be able to just open up a browser console and use it directly to see if things are loaded as you expect. It's also possible you don't have jQuery mapped to $ correctly.

    (function($) {

    might be a better test.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • SimpleModal Login
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic