2078 5

CSC329 ยท 2078 ยท 5 marks

How jQuery id selector can be used to select specific element? Write an example with jQuery that will hide a paragraph on clicking a button.

How jQuery id selector can be used to select specific element? Write an example with jQuery that will hide a paragraph on clicking a button. [5]

Web TechnologyChapter 4: Client Side Scripting with JavaScriptjQuery Selectors

The jQuery id selector uses the id attribute of an HTML tag to find and select a specific element. Since the id of an element is unique within a page, the id selector is used to select one unique element. Syntax: - The (hash) character is written followed by the id of the HTML element. -