No jQuery: after property id

$ ('# note'). Press ({$ ('# Trigger') delete () ;.

    $('#info').slideDown(4000, function(){
        $(this).fadeOut(40000);
    });
});

What I'm trying to do here is obvious. Unfortunately, when I try this piece of code, FireBug throws the following error: missing: after property id.

After trying to debug for some time, I saw that nothing seemed to happen. The selection is correctly displayed in my editor (Notepad ++), and the previous error was not found.

Thanks in advance for any help.

+3
source share
1 answer

clickexpects function. You are trying to pass it a pseudo- object-literal with invalid syntax.

$('#note').click(function() { // pass a function to "click"
    $('#trigger').remove();

    $('#info').slideDown(4000, function(){
        $(this).fadeOut(40000);
    });
});
+10
source

Source: https://habr.com/ru/post/1756386/


All Articles