fixed turbolinks/ready issue
This commit is contained in:
@ -15,7 +15,9 @@ function revealPassword($src){
|
||||
$src.removeClass('fa-lock').addClass('fa-unlock');
|
||||
}
|
||||
|
||||
$(function(){
|
||||
// Use this instead of typical $().ready
|
||||
// because turbolinks.
|
||||
document.addEventListener("turbolinks:load", function() {
|
||||
$("[data-id=passwd]").on("ajax:success", "a", function(e, data){
|
||||
getPassword($(e.target).parent(), data.hash);
|
||||
});
|
||||
|
Reference in New Issue
Block a user