Skip to content

Instantly share code, notes, and snippets.

@egeste
Created August 25, 2014 02:55
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 egeste/c768b903173d48fcf5c8 to your computer and use it in GitHub Desktop.
Save egeste/c768b903173d48fcf5c8 to your computer and use it in GitHub Desktop.
Allow "/" in IDs for bootstrap scrollspy
refresh = $.fn.scrollspy.Constructor.prototype.refresh.toString()
replace = '''$('[id="' + href.replace(/^#/, '') + '"]')'''
newRefresh = refresh.replace '$(href)', replace
eval "$.fn.scrollspy.Constructor.prototype.refresh = #{newRefresh}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment