$(document).ready(function() - don't work
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 run jQuery
in .noConflict() mode
精彩评论