Ajax post within title section of a
    <div class="slidera_img"> 
    <a href="/image1.jpg" rel="example_group" title="<a href='#'><img src='/vote.png' style='float:left; margin-left:45%;' /></a>">
    </div

I have the above code, which open a fancy box modal window, inside the modal window there is a button which is used to vote an item. I want to be able to do this via ajax. currently, i m doing on server side, with new request but i want to use jquery ajax.

As you can see second a resides within title tag. How can i access that so upon click on that, i can trigger an ajax call?

I have the code that works without the modal windows as follows:

    <script type="text/javascript">
        $(function () {
            $("div.slidera_button a").click(function (e) {
                var item = $(this);
                e.preventDefault();
                $.get('@Url.Action("VoteAjax","Home")', { id: item.attr("id") }, function (response) {
                    item.closest("li").find(".slidera_num").html(response.vote);
                });
            })
        });
</script>

How can i get this working from the modal window?


Ajax post within title section of a
===

    <div class="slidera_img"> 
    <a href="/image1.jpg" rel="example_group" title="<a href='#'><img src='/vote.png' style='float:left; margin-left:45%;' /></a>">
    </div

I have the above code, which open a fancy box modal window, inside the modal window there is a button which is used to vote an item. I want to be able to do this via ajax. currently, i m doing on server side, with new request but i want to use jquery ajax.

As you can see second a resides within title tag. How can i access that so upon click on that, i can trigger an ajax call?

I have the code that works without the modal windows as follows:

    <script type="text/javascript">
        $(function () {
            $("div.slidera_button a").click(function (e) {
                var item = $(this);
                e.preventDefault();
                $.get('@Url.Action("VoteAjax","Home")', { id: item.attr("id") }, function (response) {
                    item.closest("li").find(".slidera_num").html(response.vote);
                });
            })
        });
</script>

How can i get this working from the modal window?

