reversing the forEach loop parameters to get the value instead of the index
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 25 Oct 2018 12:49:28 +0000 (08:49 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 25 Oct 2018 12:49:28 +0000 (08:49 -0400)
views/admin/manageMembers/manage.html

index 3aa9db1..2771fa8 100644 (file)
                 url: '{$ajaxUrl}',
                 data: data,
                 success: function(data) {
-                    data.searchData.forEach( function(index, value){
+                    data.searchData.forEach( function(value, index){
                         $("<div />", {
                             text    : value,
                             class   : "glm-list-result"
-                        }).appendTo( $("#glm-admin-member-list")).delay(2000).addClass("test") ;
+                        }).appendTo( $("#glm-admin-member-list")).delay(2000).addClass("test");
                     })
                 }
             });