Modal window by clicking the info box link opened by a Google Maps marker

3

I'm using Bootstrap and in my index page, I have some modal windows working, which open when I click on a href .

I also have a div for the map that reads a JSON file, where, there is the information to add the markers in it, they are: ID, latitude, longitude and a content for an "infobox" that will open when clicking marker .

The problem is that in this contents of the infobox I have one:

<a href="#portfolioModal1" class="portfolio-link" data-toggle="modal">Veja mais</a>

In the same way that I do to open the modal window by other "a hrefs" on my page, however, this link above that is displayed in the infobox of the bookmark does not open the modal window. URL changes to http://www.meusite.com/index.html#portfolioModal1

PS: It was as if the infobox was a synopsis and clicking on See More would open all the information of the place ... but nothing happens. Any idea?

If you find it necessary to put snippets of code let me know what I put, I thought it was not necessary because anyone who knows the tools mentioned knows how they work.

Thank you!

    
asked by anonymous 20.10.2015 / 23:27

1 answer

0

I got it here. Instead of using the bootstrap ready methods to open the modal via the infobox, in my infobox I made a <a href="#" onclick="mostrar()">Veja mais</a>

And then, in my index.html I made a function js mostrar()

        $('#portfolioModal' + id).modal('toggle');
        $('#portfolioModal' + id).modal('show');

It was right, my only problem is that the page goes up (goes to the top) does not stay where it was ...

    
21.10.2015 / 13:39