how to select and change onclick attribute with jquery?
<p>with below code i can select all a href's value then change them;</p>

<pre><code>$("a").each(function(){
 if (this.hostname == location.hostname){
     var url = this.href;
     var qs = $.jqURL.get('qs');
     if(url.indexOf('qs=') == -1 &amp;&amp; (qs!= undefined &amp;&amp; qs!= '')){
        if (url.indexOf('?')&gt;0){
            $(this).attr('href', url + '&amp;qs='+ qs);

        }
        else
        {
            $(this).attr('href', url + '?qs='+ qs);

        }
    }
 }
})
</code></pre>

<p>i want to apply onclick attribute like above code too.</p>

<pre><code>&lt;div onclick="window.location.href='http://www.domain.com'" style="cursor:pointer"&gt;Test&lt;/div&gt;
</code></pre>

<p>thank you very much all, already now...</p>

<p>Regards,<br>
Kerbooo</p>
