Permalink
Browse files

Switch back to $(document).ready()

  • Loading branch information...
1 parent 92c1866 commit c060fd68f35e69b23243b44292efc02f68b5e1f2 @cespare cespare committed Feb 14, 2013
@@ -724,7 +724,7 @@ window.Commit =
unless $.trim(textarea.value) == ""
return "You have an unsaved comment."
-$ -> Commit.init()
+$(document).ready(-> Commit.init())
# This needs to happen on page load because we need the styles to be rendered.
$(window).load(-> Commit.calculateMarginSize())
$(window).bind "beforeunload", -> Commit.confirmNavigation()
@@ -369,4 +369,4 @@ window.CommitSearch =
afterSync: ->
@syncing = false
-$ -> CommitSearch.init()
+$(document).ready(-> CommitSearch.init())
@@ -26,4 +26,4 @@ window.Repos =
$("#confirmationMessage").show()
$("#confirmationMessage").html(message)
-$ -> Repos.init()
+$(document).ready -> Repos.init()
@@ -31,4 +31,4 @@ window.Stats =
}
})
-$ -> Stats.init()
+$(document).ready(-> Stats.init())
@@ -42,4 +42,4 @@ window.Settings =
Util.saveUserPreference preference, value, =>
$displayText.css { opacity: "1.0" }
-$ -> Settings.init()
+$(document).ready -> Settings.init()
@@ -21,7 +21,7 @@ window.UserAdmin =
numberOfAdminUsers: -> $("input[type=radio][value=admin]:checked").size()
-$ ->
+$(document).ready ->
$("input[type=radio]").click ->
targetUserId = $(event.target).parents("tr").attr("data-user-id")
permission = $(event.target).val()
@@ -119,6 +119,6 @@ window.KeyboardShortcuts =
@registerPageShortcut "s", -> window.location.href = "/stats"
@registerPageShortcut "i", -> window.location.href = "/inspire"
-$ ->
+$(document).ready ->
ShortcutOverlay.init()
KeyboardShortcuts.init()
View
@@ -12,7 +12,7 @@
<% end %>
<script>
- $(function() {
+ $(document).ready(function() {
if (jQuery.browser.webkit)
$("body").addClass("webkit");
else if (jQuery.browser.mozilla)

0 comments on commit c060fd6

Please sign in to comment.