Sha256: 45fc40f6c9bb60e31ac3094f927b6d87babe88f3322e07304112d640cdb646e3

Contents?: true

Size: 365 Bytes

Versions: 4

Compression:

Stored size: 365 Bytes

Contents

module OpenConferenceWare
  module FocusHelper

    # Focus the form input on the +target+ id element.
    def focus(target)
      # # Plain JavaScript
      #     content_for :javascript, <<-HERE
      # document.getElementById('#{target}').focus();
      #     HERE

      # jQuery
      run_when_dom_is_ready "$('##{h target.to_s}').focus();"
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
open_conference_ware-1.0.0.pre4 app/helpers/open_conference_ware/focus_helper.rb
open_conference_ware-1.0.0.pre3 app/helpers/open_conference_ware/focus_helper.rb
open_conference_ware-1.0.0.pre2 app/helpers/open_conference_ware/focus_helper.rb
open_conference_ware-1.0.0.pre1 app/helpers/open_conference_ware/focus_helper.rb