JQuery add onclick string to anchor that are not of a class
<p>I have some html code which is loaded by reading some json. Inside that data there are some links.</p>

<p>I need to add <code>onclick="myfunction();"</code> to the anchors of these links.</p>

<p>As I don't want any other links to be changed I have added a class to all internal link (Links which are not imported).</p>

<p>What I need is some jquery which would do this:</p>

<p>IF Links have not go <code>class="internal"</code> then add onclick="myfunction();"**</p>

<p>So if link looks like:</p>

<pre><code>&lt;a href="" class="internal"&gt;Click me&lt;/a&gt;
</code></pre>

<p>then nothing is done</p>

<p>but if it's like this:</p>

<pre><code>&lt;a href=""&gt;Click me&lt;/a&gt;
</code></pre>

<p>then it's changed to this:</p>

<pre><code>&lt;a href="" onclick="myfunction();"&gt;Click me&lt;/a&gt;
</code></pre>

<p>How can I do this?</p>
