0

i used both gmap3 and CustomScrollbar Plugin in my project. i want switch after click a tag into the infowindow specific item in side panel map.

if use "a tag" out of google map its working, but if i use "a tag" in the infowindow its not working.

so what should i do to use "a tag" out of google map its work.(for example this link markers earth hour)

tnx.

my code is:

    <a class="jumper" href="#tracker1">tracker1</a>
<a class="jumper" href="#tracker2">tracker2</a>
<a class="jumper" href="#tracker3">tracker3</a>
<div id="content-2" class="content mCustomScrollbar" style="min-height: 610px !important; max-width: 420px !important; /* overflow-x: hidden; */min-width: 420px !important;">
    <ul class="ulInfo" id="tracker1">
        <li></li>
    </ul>
    <ul class="ulInfo" id="tracker2">
        <li></li>
    </ul>
    <ul class="ulInfo" id="tracker2">
        <li></li>
    </ul>
</div>
<script>
    (function ($) {
        $(window).on("load", function () {
            $("#content-2").mCustomScrollbar({
                theme: "minimal"
            });
            $(".jumper").on("click", function (e) {
                var href = $(this).attr("href"), target = $(href).parents(".mCustomScrollbar");
                if (target.length) {
                    e.preventDefault();
                    target.mCustomScrollbar("scrollTo", href);
                }
            });
        });
    })(jQuery);
</script>
Hoorakhsh
  • 51
  • 10

0 Answers0