How to get parameters from a link that callls a jQuery function?
<p>I have a link that looks like this:</p>

<pre><code>&lt;p class="half_text"&gt;
    &lt;?php echo $upvotes; ?&gt;
    &lt;strong&gt;&lt;a class="vote_up" style="color: #295B7B; font-weight:bold;" href="#"&gt;Vote Up&lt;/a&gt;&lt;/strong&gt; |
    &lt;?php echo $downvotes; ?&gt;
    &lt;strong&gt;&lt;a class="vote_down" style="color: #295B7B; font-weight:bold;" href="#"&gt;Vote Down&lt;/a&gt;&lt;/strong&gt;
&lt;/p&gt;
</code></pre>

<p>and I have the jQuery code that looks like this:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() 
{
    $('.vote_up').click(function() 
    {        
            alert("up");

alert ( "test: " + $(this).attr("problem_id") );

//                $(this).attr("data-problemID").

        $.ajax({
                type: "POST",
                url: "/problems/vote.php",
                dataType: "json",
                data: dataString,
                success: function(json)
                {           
                    // ? :)



                }
            });


        //Return false to prevent page navigation
        return false;
    });

    $('.vote_down').click(function() 
    {
        alert("down");

        //Return false to prevent page navigation
        return false;
    });    
});
&lt;/script&gt;
</code></pre>

<p>How can I get the parameter value which is problem_id ?  If I add a url in the href parameter, I think the browser will just go to the url, no?  Otherwise - how can I pack parameter values into the jQuery?</p>

<p>Thanks!</p>
