Line:

$('#contact-bottom').css('background' : '#3F51B5 url(' + 'img/check.png' + ') no-repeat 50% 50%'); 

Mistake:

 Uncaught SyntaxError: missing ) after argument list 

The whole section of code located in Ajax:

 $.ajax({ type: "POST", //Метод отправки url: "mail.php", //путь до php фаила отправителя data: form_data, success: function() { console.log("Message successfuly send"); $("#mail-button").detach(); $('#contact-bottom').css('background' : '#3F51B5 url(' + 'img/check.png' + ') no-repeat 50% 50%'); } }); 

    2 answers 2

    Missing brackets { } required to create an object is the argument of the $().css function:

     $('#contact-bottom').css( { 'background' : '#3F51B5 url(' + 'img/check.png' + ') no-repeat 50% 50%' } ); 

    or replace : with,:

     $('#contact-bottom').css( 'background', '#3F51B5 url(' + 'img/check.png' + ') no-repeat 50% 50%' ); 

    http://api.jquery.com/css/

      Constructs ('string': 'string') in JS raise questions - why the colon?
      Output 2:

      1. Turn it into an object where : legal:
        ({'background' : '#3F51B5 url(' + 'img/check.png' + ') no-repeat 50% 50%'}); .

      2. Or you can refuse this construction (in jQuery you can set one rule like this: ('background', '#3F51B5 url(' + 'img/check.png' + ') no-repeat 50% 50%'); ).