Technical Support Engineer - Home Assignment
Technical Support Engineer - Home Assignment
e. All input elements that have a div element with class “ctaWrapper” as a parent:
g. All h1 elements with an attribute of data-type that equals “title” with header element
as the parent:
Solution : h1[data-type=”title”] {
//CSS property we can add here like margin:10px;
}
Solution
<!DOCTYPE html>
<html>
<body >
<div class="menu_top_item">
<div id="1" style="height:100px; width:100px;"><a href="#">1</a></div>
<div id="3" style="height:100px; width:100px;"><a href="#">3</a></div>
<div id="4" style="height:100px; width:100px;"><a href="#">4</a></div>
<div id="2" style="height:100px; width:100px;"><a href="#">2</a></div>
</div>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
var CTallaels = $(".menu_top_item");
var CTacount = 0;
for (i = 0; i < CTallaels.length; i++) {
CTallaels[i].id = "RowExpand" + CTacount;
CTacount++;
}
</script>
</body>
</html>
OUTPUT:
<!DOCTYPE html>
<html>
<body>
<div id="1" style="height:100px; width:100px;"><a href="#">1</a></div>
<div id="3" style="height:100px; width:100px;"><a href="#">3</a></div>
<div id="4" style="height:100px; width:100px;"><a href="#">4</a></div>
<div id="2" style="height:100px; width:100px;"><a href="#">2</a></div>
</body>
</html>
Write code that would catch the click of the mouse on the links and use console.log to write
the contents of the link that was clicked to the console.
Add no more than 1 listener. The listener should be on the body element.
Solution:
<!DOCTYPE html>
<html>
<body>
<div id="1" style="height:100px; width:100px;"><a href="#">1</a></div>
<div id="3" style="height:100px; width:100px;"><a href="#">3</a></div>
<div id="4" style="height:100px; width:100px;"><a href="#">4</a></div>
<div id="2" style="height:100px; width:100px;"><a href="#">2</a></div>
<script>
document.body.addEventListener("click", event => {
let target = event.target;
if (target.nodeName == "A") {
console.log(target.textContent);
}
});
</script>
</body>
</html>
6. Case 1
An angry customer contacts you. They are complaining about a technical issue that was opened a
few weeks ago. They mentioned that they tried contacting Support several times, they are
very frustrated and want everything to be resolved within the hour.
7. Case 2
Hi,
I've been using Contentsquare successfully in my offline test environment but now that I
placed the code in my live site, it is slowing it down! Please advise as we are planning to
remove the tag from the site. We are also seeing some errors in the console that seem to be
coming from you.
o Please elaborate on the technical troubleshooting you would do to the best of your
knowledge; how would you go about troubleshooting such a case
8. Case 3
please write an email to the Director of E-commerce of a customer of ours: She is unhappy with the
Contentsquare Product due to many bugs and expects it to be fixed by tomorrow. You know
that R&D are planning to release the next version only in 2 weeks.