Support » Plugin: SimpleModal Login » Call simplemodal-login from another plugin

Viewing 4 replies - 1 through 4 (of 4 total)
  • $('.simplemodal-login').click()

    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.

    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.

    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?

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Call simplemodal-login from another plugin’ is closed to new replies.