Question: After comparing the `while` and `for` loops, I have a question as to how the `while` loop keeps track of which count in the sequence it's on. A basic `for` loop goes like this: 

```
for (var i = 0; i < 5; i++) {
    console.log(i);
}

```

So the first time it runs, `i` equals `0` which fulfills the condition that `i` is less than `5`, so it executes the block of code. It then increments the variable `i` so in the next sequence `i` equals `1` which satisfies the condition and so on. 

The `while` loop doesn't appear to have a variable that stores that sort of information. Here is a piece of code I found online.

```
function factorial(n) {
    var result = n;
    while (n > 1) {
        result = result * (n-1);
        n--;
    }
    console.log(result);
}

factorial(3);

```

So, after calling `factorial(3)`, result equals `3` which is greater than `1` so the code executes and result becomes `6`. In the next sequence, `n` equals `2` so `6` multiplied by `2` minus `1` is `6` so the final output is `6`. My question is why isn't there an `n` variable like the `i` variable in the `for` loop? When the loop decrements `n`, why isn't is doing `3` minus `1` over and over again?

Answer: 
You could simplify your code significantly if you used some sort of data attribute which would target specific popup:

```
<td class="bigPop" data-target=".licensePopUp"><img src="images/license/license_1.jpg"></td>
<td class="bigPop" data-target=".licensePopUp2"><img src="images/license/license_2.jpg"></td>
<td class="bigPop" data-target=".licensePopUp3"><img src="images/license/license_3.jpg"></td>

```

And JS then:

```
$(".bigPop").click(function () {
    $($(this).data('target')).fadeIn();
});

```

This approach offers additional flexibility, because now `data-target` can be any CSS selector, not only class name, but also id, etc.
How about this one? I tried to use the [event.target](http://api.jquery.com/event.target/). 

```
 $(".bigPop").click(function(event){
          var target = $( event.target );
          target.fadeIn();

 });

```

Note I haven't tested the code yet.