javascript issue in sharepoint
<p>I am having issues making a <code>javascript</code> work. Basically i just use this script for different web parts which have the <code>.q1table</code> class to insert some other classes.</p>

<p>I am getting an error uncaught type error Property $ of object[object window] is not a function.This works fine when the page is in normal mode but in edit mode it throws error.</p>

<p>can some one please tell me what am i doing wrong here.</p>

<pre><code> jQuery('.q1Table tr').each(function (index) {

   var $wp = $(this).find('tr:first');  ---this line throws the error

   var $1TR = $wp.closest('tr');
   $1TR.addClass("TitleBar");
   $1TR.removeClass('ms-Header');
</code></pre>

<p>Thanks</p>
