Skip to content

Instantly share code, notes, and snippets.

@rickharris
Created April 25, 2012 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickharris/2494017 to your computer and use it in GitHub Desktop.
Save rickharris/2494017 to your computer and use it in GitHub Desktop.
mediaelement.js & Olark - quick event bubbling fix
# This is a waste of a function call, but it operates as a pseudo-olark-ready
# callback, which is just what we need to attach an event to it so that the
# video player loses focus before someone starts typing in the Olark box.
olark 'api.visitor.getDetails', (details) ->
olarkTextarea = $('#habla_wcsend_input')
olarkTextarea.focus ->
$(document).click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment