jquery - starting with element passed into function via this pointer
<p>I am very new to jQuery so this may be a really stupid question. :-)  I'm trying to get something like the following working:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;JQuery test&lt;/title&gt;
    &lt;script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      google.load("jquery", "1"); // Load jQuery

      function DoSomething(link)
      {
        $(link).after('&lt;div&gt;hello world!&lt;/div&gt;');
      }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;a href="javascript: DoSomething(this);"&gt;Click!&lt;/a&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Right now that doesn't seem to do anything.  But if I change the line to:</p>

<pre><code>$('a').after('&lt;div&gt;hello world!&lt;/div&gt;');
</code></pre>

<p>Then a DIV does get inserted.  However, I want to use an element passed into the function to control where the element gets inserted.  Basically, I can't figure out how to start a jQuery query based on an element passed in to a function via the "this" pointer.</p>

<p>Thanks for the help,</p>

<p>~ Justin</p>
