Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #19 from rstacruz/revert_8
Browse files Browse the repository at this point in the history
Revert unbinding of all event delegates
  • Loading branch information
kossnocorp committed Jan 31, 2013
2 parents e433266 + 9b0661e commit a608907
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
18 changes: 0 additions & 18 deletions spec/jquery.turbolinks_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,6 @@ describe '$ Turbolinks', ->

callback1.should.have.been.calledWith($)

it '''
should remove all events delegated to
document after trigger fetch
''', ->
id = getUniqId()
selector = '#' + id
addEl = ->
$('body').empty()
$('<div>').attr(id: id).appendTo('body')

addEl()
$(document).on('event_name', selector, callback1)
$(selector).trigger('event_name')
$(document).trigger('page:fetch')
addEl()
$(selector).trigger('event_name')
callback1.should.have.been.calledOnce

describe '$.setReadyEvent', ->

beforeEach ->
Expand Down
1 change: 0 additions & 1 deletion src/jquery.turbolinks.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ turbolinksReady = ->

# Fetch event handler
fetch = ->
$(document).off(undefined, '**')
$.isReady = false

# Bind `ready` to DOM ready event
Expand Down

0 comments on commit a608907

Please sign in to comment.