JavaScript jQuery Basics Working with jQuery Collections Changing Element Properties

Nicholas Wallen
Nicholas Wallen
12,278 Points

Why are we calling it 'target'?

She said "or in our case, we will use 'target'".

Why though?

2 Answers

Steven Parker
Steven Parker
176,676 Points

When using the attribute method, the first argument is the name of the attribute, and "target" is the name of the attribute that will be changed.

Setting the "target" attribute to "_blank" tells the browser to open the link in a new tab or window, and that's the behavior this code is intended to achieve.

maya sophie
maya sophie
5,754 Points

is 'target' because you will click random on one of links and target follows your click = I click this link or that link(target = what you click only)...in simple common words:)))