I am very new to jquery and js but have this code in myphp.php file:
<?php
echo "<div><tr><a href='javascript:getspreadsheets();'>Cape Culture (10 years)</a></tr><br />";
echo "<tr><a href='javascript:getspreadsheets();'>Winsters (5 Years)</a></tr><br />";
echo "<tr><a href='javascript:getspreadsheets();'>Kayo (1 year)</a></tr><br />";
echo "<tr><a href='javascript:getspreadsheets(1498);'>Col Timbers</a></tr></div>";
?>
  <script type="text/javascript">
function getspreadsheets(val)
{
    alert(val);
    var self = this,
        activityguid = self.activityguid,
        accountguid  = self.accountguid
        $.fileDownload(
            'data/export.items_to_csv.php',
            {
                httpMethod: 'POST',
                data: {
                    activityguid : activityguid,
                    accountguid  : accountguid,
                    classid      : val
                }
            });
        alert(val);
    //}
}
 </script>
when i run it i get the first alert but then get an error stating the $ is undefined? can some one help please? thanks
 
     
     
     
    