• Resolved petoz

    (@petoz)


    Hi, i want invoke the popup after a slide of a jquery button

    I’ve tried this solution but don’t work…any hint or solution ?

    sound like this:

    jQuery(document).ready(function() {
      $loginregister = false;
      	 jQuery(".btn_select").stop().animate({marginLeft: '0px' });            
    
     jQuery(".btn_select").click(function(){
    	jQuery(this).blur();
    			if ($loginregister == false){
    		 jQuery(this).stop().animate({marginLeft: '70px' });
    		 jQuery(window.location).attr({
                                                  href: '/wp-login.php',
                                            'class': 'simplemodal-login'
                                                    });
    		 $loginregister = true;
    			                         }else{
     jQuery(this).stop().animate({marginLeft: '0px' });
    				$loginregister = false;
    			                          }
    			         return false;
    		                });
      });
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Eric

    (@emartin24)

    The following should invoke the modal dialog:

    $('.simplemodal-login').trigger('click.simplemodal-login');

    Thread Starter petoz

    (@petoz)

    this work, but worked only the first time ??

    there is a ” reset” for this function ?

    I’m coding with jQuery only about a week… sorry !

    Thread Starter petoz

    (@petoz)

    Solved! thank you very much !

    How did you solve this? I am trying to password protect a page by triggering the login box, but it’s not popping up. Any other suggestions?

    This is what I did:

    `<?php
    if (is_user_logged_in() ) {
    <!– display page –>
    }
    else {
    <script type=”text/javascript”>
    jQuery(document).ready(function() {
    jQuery(‘.simplemodal-login’).trigger(‘click.simplemodal-login’);
    });
    </script>
    }`

    Thread Starter petoz

    (@petoz)

    try with .bind() instead the .trigger()

    Nope, its not doing it..

    Thread Starter petoz

    (@petoz)

    sorry, i solved with .bind() here works fine

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: SimpleModal Login] invoke popup from jquery’ is closed to new replies.