Changing the onclick
<p>Ok so I have this</p>

<pre><code>&lt;img width="38" height="39" onclick="jreviews.favorite.add(this,{listing_id:2655})" class="imgFavoriteAdd" alt="Add to favorites" id="jr_favoriteImg2655" src="http://kingdomshopper.com/templates/jreviews_overrides/views/themes/default/theme_images/fav_add.png"&gt;
</code></pre>

<p>and as you can see the onclick is </p>

<pre><code> jreviews.favorite.add(this,{listing_id:2655})
</code></pre>

<p>I need to change the onclick to </p>

<pre><code>jreviews.favorite.remove(this,{listing_id:2655})
</code></pre>

<p>but when i do </p>

<pre><code> jQuery("#jr_favoriteImg2655").attr("onclick")
 onclick(event)
</code></pre>

<p>can i do </p>

<pre><code> jQuery("#jr_favoriteImg2655").attr("onclick", "jreviews.favorite.add(this,{listing_id:2655})")
</code></pre>

<p>or is there a better or another way</p>
