开发者

$(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?

$(document).ready(function() - don't work


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜