Question: I've got a script that I want to include a html file based on the list item's id.

I've got two list items

```
<ul class="fruits">
         <li id="0">Apples</li>
         <li id="1">Pears</li>
</ul>

```

Now here's my script so far. Basically I want to check the `id` of the selected list item and insert a html file with a description of that fruit.

Script is

```
$(document).ready(function() {
$(".fruits li").click(function() {
                if(this.id == "0") {
                    $(".fruit_copy").load("blocktext/apple.html");
                }
        });
});

```

And I want this `<div class="fruit_copy"> </div>` to be populated with the `HTML` content. But of course it's not working.

Answer: 
You could do something cleaner, like that :

HTML part :

```
<ul class="fruits">
         <li data-dest="blocktext/apple.html">Apples</li>
         <li data-dest="blocktext/pears.html" >Pears</li>
</ul>

```

JS part : 

```
$(document).ready(function() {
  $(".fruits li").click(function() {
     // you don't need IDs or if/else statement.
     var dest = $(this).attr('data-dest');
     $(".fruit_copy").load(dest);
   });
});

```
* The options values are "falsey", they're strings whilst you're checking integers, help it by adding `.toString()`:

We also append the `===` so we're not type checking - string to string.

```
if ( this.id.toString() === "0" ) {
   //Code
}

```

* Lastly, check your console & use the network tab to see if your script is successfully collecting the `.html` file with a `200` HTTP code.