Q:

First if statement keeps running even when false

I've run into a problem with my if statements, been going over them and using console logs to make sure my variable which was declared before hand changes to a certain number when a div is hovered over, and the variable does change.
However for some reason the statements that should trigger when the variable is equal to a certain value doesn't change, it keeps running the first IF and I can't seem to figure out why, here is my syntax:
$('.work_thumbs').click(function()
{
    $('#shadow').fadeTo(200, 0.7);
    $('#image_holder').delay(200).show();

    if (thumbCheck = 1) {
                $('#image_holder').append('<img     style="cursor:pointer" class="holder_contents"     src="file:///C:/Users/Martin/martin_bodger/images/hi_res_images/ccda_exhibit.jpg">');

        } else if (thumbCheck = 2) {
                $('#image_holder').append('<img     style="cursor:pointer" class="holder_contents"     src="file:///C:/Users/Martin/martin_bodger/images/hi_res_images/yourock.png">');

        } else if (thumbCheck = 3) {
                $('#image_holder').append('<img     style="cursor:pointer" class="holder_contents"     src="file:///C:/Users/Martin/martin_bodger/images/hi_res_images/visualsynopsisposter.png">'    );

        } else if (thumbCheck = 4) {
                $('#image_holder').append('<img     style="cursor:pointer" class="holder_contents"     src="file:///C:/Users/Martin/martin_bodger/images/hi_res_images/awesome.jpg">');

        } else if (thumbCheck = 5) {
                $('#image_holder').append('<img     style="cursor:pointer" class="holder_contents"     src="file:///C:/Users/Martin/martin_bodger/images/hi_res_images/gameover.png">');

        } else {
                $('#image_holder').append('<img style="cursor:pointer" class="holder_contents" src="file:///C:/Users/Martin/martin_bodger/images/hi_res_images/whereisbill.png">');

        }

});

A:

Use
if (thumbCheck == 1)

that is, == (comparison) instead of = (assignment).

A:

use == comparison operator instead of = assign operator
thumbCheck == 1

not
thumbCheck = 1

