Three Divisions jQuery Cognizant Handson Program
Design an html page with three divisions(using div tag), which should contains following attributes:
Each division contains a paragraph tag (<p>) with the texts given below:
<p> tag 1: Distributed Artificial Intelligence (DAI)
<p> tag 2: Artificial Super Intelligence (ASI)
<p> tag 3: Intelligence Amplification (IA)
Using jQuery finds all the divisions with an attribute name that ends with ‘Intelligence’ and sets the background color yellow when the user click on the button “Click to see the effect”.
Note:
- Do not alter the given ‘divisions.html’ file. Write your jQuery code in the file ‘divisions.js’.
- Avoid writing the jQuery ‘document ready’ method for the proper web page visibility.
- Do not use ‘ES6’ features.
divisions.js
//WRITE YOUR jQUERY CODE HERE $('#button1').click(function(){ $("#DAI").css( "background", "yellow" ); $("#ASI").css( "background", "yellow" ); });