0

HTML Part

<a class="btn ban-default loginsignupbutton" href="#" data-featherlight="#fl1">Login/Signup</a>


<div class="lightbox" id="fl1">         
<h2>Login</h2>
<input name="loginuserphone" placeholder="MOBILE NUMBER" type="text">
<input name="loginuserpassword" placeholder="PASSWORD" type="password">
</div>

What I want to do:

actually the basic script is working fine, when user clicks on the button, the lightbox popup is coming... but I want to AUTO open the popup, on page loads.

I Tried

$('.loginsignupbutton').trigger('click');

did't worked, then i tried.

$('a.loginsignupbutton').featherlight({
  openTrigger:    'click',
});    

did't worked.

Any help is appreciated.

19
  • Does (!!$.cookie('token') condition satisfy? Commented May 3, 2016 at 4:14
  • Yes, i actually got that solution from stackoverflow.com/questions/6362688/… Commented May 3, 2016 at 4:31
  • Just keep an alert inside if and check if it is passing? Commented May 3, 2016 at 4:32
  • @GuruprasadRao oops, that function seems not be working. but still i tried just to trigger it from JS. like leaving the cookie part, just want to show that popup when page loads. even that didn't worked :( Commented May 3, 2016 at 4:36
  • can you try setting up an example fiddle? Commented May 3, 2016 at 4:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.