0

I'm trying to target certain HTML tags generated by a framework, basically I'm trying to aim for the attributes and their values but since the framework auto generate them they have really weird naming. I can't target classes because there are multiple tags with the same class names.

In order to target this element:

<div class="jx_ui_html_div" __jx__id="___$_90__nav_bar">

I'm trying:

let chatNavBar = document.querySelectorAll('[__jx__id="___$_90__nav_bar"]')

When I console log "chatNavBar" I'm getting and empty object.

I know that i have to escape some characters on the attribute value and name but I just can't figure out how, any help will be really appreciate it.

Here's a snippet of what I'm trying to aim here:

let chatNavBar = document.querySelectorAll('[__jx__id="___$_90__nav_bar"]')
console.log("Selected Element:" + '' + JSON.stringify(chatNavBar))
<div class="jx_ui_html_div" __jx__id="___$_90__nav_bar">
   <p>Hellow World</p>
<div>

Or on CodePen

Andreas
  • 21,535
  • 7
  • 47
  • 56
Lowtrux
  • 156
  • 2
  • 12
  • 41

1 Answers1

-2

The class of this element is just : "jx_ui_html_div"

Schalcke
  • 11
  • 5