2

I'm trying to open a modal when a user is clicking it. I'm currently using a popup maker.

ex. www.hello.com/test

the /test would be the # variable of the modal link.

<a href="#test" class="hello"> Im a hidden modal in a link menu</a>

I tried reading the popup maker documentation and i need to do this instead.

<a href="#popmake-123" class="hello"> Im a hidden modal in a link menu</a>

But when i tried entering the link like this "www.hello.com/#popmake-123" there's no auto modal showing.

I tried with these codes so far.

$(window.location.hash).modal('show');
$('a.popmake-user-login').click(function(){
    window.location.hash = $(this).attr('href');
});

but nothing's happening. Thank you in advance guys.

(link source) Bootstrap 3.x: how to have url change upon clicking modal trigger?

rrw
  • 23
  • 2

1 Answers1

0

Try this code

jQuery(document).ready(function(){
   jQuery(window.location.hash).modal('show');
   jQuery('a.popmake-user-login').click(function(){
      window.location.hash = jQuery(this).attr('href');
    });
});
Vel
  • 9,027
  • 6
  • 34
  • 66