Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shahr's avatar
Level 10

Uncaught TypeError: editAddress.fadeIn is not a function

What is this error?

fadeIn

var editAddress = $('#editAddress');

editAddress.find('.close').click(function () {
    editAddress.fadeOut(200);
    $('.shopping #dark').fadeOut(200);
});

$('.editAddress').click(function () {
    editAddress.fadeIn(200);
    $('#dark').fadeIn(200);
});
0 likes
3 replies
shahr's avatar
Level 10

@nakov

I already use the whole jQuery function.

<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
Nakov's avatar
Nakov
Best Answer
Level 73

@oxbir and is the jquery completely loaded before you run the script? Is the script added before you load your own script.js file?

Try to wrap it with the document ready event and see if that will change anything?

$(function(){
    var editAddress = $('#editAddress');

    editAddress.find('.close').click(function () {
        editAddress.fadeOut(200);
        $('.shopping #dark').fadeOut(200);
    });

    $('.editAddress').click(function () {
        editAddress.fadeIn(200);
        $('#dark').fadeIn(200);
    });
})
1 like

Please or to participate in this conversation.