if() url doesn't work if value is coming from data attribute?

kevinpowell 0 50 0
Open on CodePen More by kevinpowell