Gmap3 - Forum

Gmap3 exchange platform

You are not logged in.

Ads
(server costs 27.50€ per month)


#1 2012-10-16 13:31:42

lepalmier
Member
Registered: 2012-10-16
Posts: 1

Event click in infobox

Hi,

I have infoboxes that show up when you mouseover a marker. In that infobox, there is a link that should be called in Ajax when it's clicked.
The event is not bound eventhough I did.
Here is my code to make it more understandable :

<div class="infobox">
    <a class="add-button" href="url/to/call">
        <img alt="Ajouter" src="/images/front/add.jpg">
    </a>
</div>

And the Javascript :

$('.add-button').live('click', function(e){
    $this = $(this);
    e.preventDefault();
        $.post(
            $this.attr('href'),
            {},
            function(data){
                alert('ok');
            });
    });

How can I make jQuery catch the event inside the infobox ?

Thanks a lot

Offline

Ads
(server costs 27.50€ per month)


Board footer

Powered by FluxBB