Skip to content

Instantly share code, notes, and snippets.

@kingsleyh
Created January 10, 2014 12:23
Show Gist options
  • Save kingsleyh/8351067 to your computer and use it in GitHub Desktop.
Save kingsleyh/8351067 to your computer and use it in GitHub Desktop.
require 'opal'
require 'jquery'
require 'opal-jquery'
def go(selector)
`$('#cool');`
end
p go
<!DOCTYPE html>
<html>
<head>
<title>opal demo</title>
<%= javascript_include_tag 'application' %>
</head>
<body>
<div id="cool">this is cool</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment