jQuery Id Selector

Jquery Id Selector select html element with id attribute . Id is unique for all HTML element

Syntax for Id Selector

$("#id-name")

Id Selector select only first id if same name of id exists that mean same name multiple id exists

Example

Change style of Selected Id

jQuery change style of html selected element

Syntax to change style

$("myid").css(property,value)

Change the style of  h1 heading

Example

Apply Multiple CSS Property by jQuery

Change style of HTML Element with multi CSS property

pass all css property in object form within

Syntax for Multi CSS Property

element.css({"property1":"value1","property2":"value2"})

Now apply jquery css property

Example

Related Articals

jQuery Syntax

jQuery ClassName Selector

jQuery TagName selector