   injectShowPasswordCheckboxInDom: (showPasswordWrap) ->
     errorMessage = @field.parent('form').find('.inline_errors').first()
     if errorMessage.length
-      errorMessage.after showPasswordWrap
+      errorMessage.after(showPasswordWrap)
     else
-      @field.after showPasswordWrap
+      @field.after(showPasswordWrap)
     @showPasswordCheckbox.checked = false # Firefox reload ;-)
 
   #
   # @private
   #
   showPassword: ->
-    @showPasswordCheckbox and @showPasswordCheckbox.attr 'checked'
+    @showPasswordCheckbox and @showPasswordCheckbox.prop('checked')
 
   #
   # @private


    # We can't simply modify the type attribute of the field (from 'password' to 'text'), because IE doesn't support this
    # cf: http://www.alistapart.com/articles/the-problem-with-passwords
    newField = $ '<input />'
      id:          @field.attr 'id'
      name:        @field.attr 'name'
      value:       @field.attr 'value'
      size:        @field.size()
      placeholder: @field.attr 'placeholder'
      required:    @field.attr 'required'
      class:       @field.attr 'class'
      type:        fieldType

    pseudoPlaceholderObject = @field.data('pseudoPlaceholderObject') if @field.data 'pseudoPlaceholderObject'

    @field.removeData() # Removes eventual observers and storage keys
    @field.replaceWith newField

  # @private
  #
  attachEventHandlerToCheckbox: ->
    @showPasswordCheckbox.on('click', this.togglePasswordVisibility)

  #
  # @private
