Skip to content

Instantly share code, notes, and snippets.

@mathurakshay
Created June 22, 2012 07:15
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 mathurakshay/2970947 to your computer and use it in GitHub Desktop.
Save mathurakshay/2970947 to your computer and use it in GitHub Desktop.
Showing in-context popup in a long iframe
class FeedView extends Backbone.View
events:
"click .show_details" : "show_prod"
show_prod: (e) =>
window.aprox_scroll_y = e.pageY - e.screenY
popup_top = (screen.height / 2) + window.aprox_scroll_y
popup_top = 251 if popup_top < 251 ## Have some minimum value
$("#prod_popup").modal().css('top', popup_top + 'px')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment