How do I add a value to the data- of jquery?

I want to send the value to the data- series

attr("data-discount_id", response.discount_id)

but I find that there is no way to do it.
make sure the response.discount_id has a value
is there any way to enter the value?


$dom.attr('data-discount_id', response.discount_id)
//
$dom.data('discount_id', response.discount_id)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf0b4a-31cf9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf0b4a-31cf9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?