It makes things like HTML document traversal and manipulation, event handling, animation, and that works across all browsers
a presentation by Julia Dizhak
May 02, 2018
It makes things like HTML document traversal and manipulation, event handling, animation, and that works across all browsers
$('*')
- find everyting$('span')
- by tag$('#AB-test')
- by id$('.menu')
- by class$('div, span, p')
- several elements$('#container').addClass('isCool)
$('p').removeClass('closed')
$('span').toggleClass('animation')
$('div').hide()
$('div, p').hide()
$('div').show()
- show hidden element$('#myDiv').text()
- get the text$('span').text('Hello Laura')
- set the text$('#myDiv').html()
- get/set inner html$('input').val()
- used with inputs, get/set value$('span').css({'color': 'blue'})
- styles$('span, div').css({'font-size': '14px', 'color': 'green'})
$('span').wrap('...')
- wrap an element$('.inner').append('...')
- insert inside$('.inner').after('...')
- insert outside$('.container').remove()
$('p').addClass('sophisticated)
.text('Hello Jquery')
.show()