Question: I'm currently trying to make the function below work correctly. Recently added the IF ELSE variables to it, and after the my script no longer works. If I remove it of course, everything goes back to normal, minus that feature of course. What am I doing wrong exactly? Thanks in advance!

```
var image3 = $("#image3");

$(function() {
 $("#ID-OF-LINK-1").click(function() {
        $("#image1").attr("src","./image1.jpg");
        $("#image2").attr("src","./image2.jpg");
            if (image3.src != "./image3.jpg"){
                ("#image3").attr("src","./image4.jpg"); }
            else
                ("#image3").attr("src","./image3.jpg"); }
  })

})

```

Answer: 
Mis-matched curly braces. You need another opening curly brace after the "else". Try this:

```
var image3 = $("#image3");

$(function() {
 $("#ID-OF-LINK-1").click(function() {
        $("#image1").attr("src","./image1.jpg");
        $("#image2").attr("src","./image2.jpg");
            if (image3.src= "./image3.jpg"){
                ("#image3").attr("src","./image4.jpg"); }
            else {
                ("#image3").attr("src","./image3.jpg"); }
  })

})

```
```
("#image3").attr("src","./image4.jpg");

```

should be

```
$("#image3").attr("src", "./image4.jpg");

```

Same for `("#image3").attr("src","./image3.jpg");` of course

Besides that, as the others already said, you forgot some curly braces.

Here's a proper version which also fixes some other issues (proper attribute access on `image3` and re-using the `image3` jQuery object created at the beginning):

```
$(function () {
    var image3 = $("#image3");
    $("#ID-OF-LINK-1").click(function () {
        $("#image1").attr("src", "./image1.jpg");
        $("#image2").attr("src", "./image2.jpg");
        if (image3.attr('src') != "./image3.jpg") {
            image3.attr("src", "./image4.jpg");
        } else {
            image3.attr("src", "./image3.jpg");
        }
    });
});

```