vendor/assets/javascripts/jquery.screenfull.js.coffee in jquery-screenfull-rails-0.0.3 vs vendor/assets/javascripts/jquery.screenfull.js.coffee in jquery-screenfull-rails-0.0.4
- old
+ new
@@ -1,13 +1,12 @@
-#= require jquery
+#= require screenfull
do (jQuery) ->
$.isFullScreenEnabled = ->
screenfull.enabled && screenfull.raw.fullscreenchange
$.extend $.fn,
fullScreen: ->
- @.each ->
- $(@).on 'click', ->
- screenfull.toggle(@) if $.isFullScreenEnabled()
- .on screenfull.raw.fullscreenchange ->
- $(@).trigger(if screenfull.isFullscreen then 'fullscreen:enter' else 'fullscreen:exit')
+ $(@).on 'click', ->
+ screenfull.toggle(@) if $.isFullScreenEnabled()
+ .on screenfull.raw.fullscreenchange ->
+ $(@).trigger(if screenfull.isFullscreen then 'fullscreen:enter' else 'fullscreen:exit')