Fix when #resource/id url paths

getPopover function fail when using #resource/id url paths, typically used on backbone.js projects. This PR fixes that bug.