changing js/jquery DOM script with promise