Fix missing bracket in name selector in url anchor jumping

This commit is contained in:
Paul Kaplan 2015-05-26 07:49:45 -05:00
parent 033c2e7140
commit bbe200e3cf
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ Discourse.URL = Ember.Object.createWithMixins({
Em.run.schedule('afterRender', function() {
var $elem = $(id);
if ($elem.length === 0) {
$elem = $("[name=" + id.replace('#', ''));
$elem = $("[name='" + id.replace('#', '') + "']");
}
if ($elem.length > 0) {
$('html,body').scrollTop($elem.offset().top - $('header').height() - 15);