.val is not working here, approximate its intent with .prop("checked")

This commit is contained in:
Brian Jacobel
2016-05-17 18:14:10 -04:00
parent a893c00b20
commit ad2a9a985d

View File

@@ -129,7 +129,8 @@ if Backbone?
isPrivilegedUser: DiscussionUtil.isPrivilegedUser()
})
)
@$(".forum-nav-sort-control").val(@collection.sort_preference)
@$(".forum-nav-sort-control option").removeProp("selected")
@$(".forum-nav-sort-control option[value=#{@collection.sort_preference}]").prop("selected", true)
$(window).bind "load scroll resize", @updateSidebar
@@ -524,5 +525,3 @@ if Backbone?
type: "POST"
error: () =>
$('input.email-setting').attr('checked','checked')