js select elements that have data attribute code example
Example 1: get data attribute javascript
//
const el = document.querySelector('#element')
el.dataset.name // 'john'
Example 2: js select by data attribute
$("[attribute=value]")
//
const el = document.querySelector('#element')
el.dataset.name // 'john'
$("[attribute=value]")