The below code is working when i paste it in the browser directly (chrome console). But it is not working from my source file
<script type="text/javascript" >
$(".test").click(function(){
$(this).parent().find("div").toggle();
});
</script>
try replace $ by writing jQuery..
like,
jQuery(function(){