Login
Remember
Register
References
Ranks
Add reference
JS - Get the first element in document with specific CSS class with document.querySelector
0
votes
226
views
added
Aug 8, 2019
in
Javascript
by
LC Marshal
Captain
(
25,790
points)
document.querySelector(".classname");
first
css
class
js
javascript
queryselector
Related reference
JS - get element by class name with getElementsByClassName
JS - remove class
JS - select element by class
JS - Get specific slash value on URL with split()
JS - function of get specific ID element in P element with getElementsByTagName
JS - DOM CSS customization
JS - Get specific element with querySelectorAll
How to get CSS :hover state in a jQuery selector?
lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
All categories
API
(35)
React
(148)
Javascript
(99)
Next JS
(10)
jQuery
(176)
CSS
(140)
SCSS
(24)
UI design
(1)
Vue
(25)
JSX
(10)
ES6
(8)
Regex
(6)
PHP
(61)
mySQL
(9)
Drupal
(15)
Bootstrap
(22)
Repository
(37)
Software & tools
(38)
Google tools
(28)
Plugins
(13)
Gulp
(9)
NPM
(9)
Node JS
(7)
CMS
(9)
Command-line
(7)
Database
(2)
Domain & hosting
(16)
Elixir
(1)
HTML
(21)
Networking
(4)
Python
(0)
Server issues
(9)
VM & Remote desktop
(2)
VSCode
(6)
Windows
(10)
XSLT
(5)
General
(868)
...