Retrieving HTML data-attributes using jQuery May 18, 2023 by Tarik Use the jQuery .data() function: var speed = $("yourdiv").data("ts-speed");