Jump to content

jquery на странице - ошибка


Recommended Posts

Создал страницу, в контент поместил вот такой кусок кода:

$('form.informer').on('submit', function(e) {
	e.preventDefault();
	button = $(this).find('input[type="submit"]');
	url = $(this).find('input[name="domain"]').val();
  
  	getElement(url, '.side_y', function(element) {
       $('#q').html(element);
    });
  
  
	return false;
});

и в консоле браузера ошибка:
 

This is a browser feature intended for developers. Do not paste any code here given to you by someone else. It may compromise your account or have other negative side effects.

Как подружить IPS и jquery

Link to comment
Share on other sites

53 минут назад, Ps-simpla сказал:

консоле браузера ошибка

Эм... Вы перевод этого соообщения вообще читали? Да и вас не смутило то, что текст этой "ошибки" не красный?

Link to comment
Share on other sites

перевод читал, смутило. Но на странице скрипт не срабатывает, а на простой html странице срабатывает...

Link to comment
Share on other sites

Тему можно удалить,  не указал var для новых переменных
 

var button = $(this).find('input[type="submit"]');
var url = $(this).find('input[name="domain"]').val();

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Ваша ссылка была автоматически строена.   Отображать как обычную ссылку

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...