I am using Rails & jQuery.
Here is HTML which I get:
<head>
<title>Some</title>
<script src="/javascripts/jquery.js?1305699774" type="text/javascript"></script>
<script type="text/javascript">
alert("2");
$(document).ready(function() {
alert("1");
....
When I am refreshing the window I get only one alert message (“2”).
Why I didn’t get second alert message?

You have included
prototype, which also defines$.So use
jQuery()instead of$and runjQueryin .noConflict() mode