using getAttribute instead of dataset

using getAttribute instead of dataset