dom query
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jorgevelizf 48dbdf1c5d transfer 2 years ago
src transfer 2 years ago
.gitignore transfer 2 years ago
LICENSE transfer 2 years ago
README.md transfer 2 years ago

README.md

domQuery

base core for dom manipulation

Minified using Closure Compiler

  • Query Selector
$('.red-color') // by class
$('#label') // by id
  • Click
$('#print').click(() => {
  console.log('👾')
})
  • Val javascript $('#phoneNumberInput').val() // get text value $('#phoneNumberInput').val('+123123123') // set text value
  • Text
$('#h1Text').text() // get text from h1 element
$('#h1Text').Text('TITLE') // set text to h1 element
  • Add a Class
$('#h1Text').addClass("red-color");