fork download
  1. var tag; //определение глобальной переменной для тегов
  2.  
  3. $(function() {
  4.  
  5. $(".list-inline").on("click", ".tag-information", function() {
  6.  
  7. var obj = {};
  8. obj.tag = $(this).text();
  9. tag = $(this).text();
  10.  
  11. //выделение выбраного тега
  12.  
  13. $(this).removeClass('tag-information').addClass('active-tag');
  14. $('a.active-tag').removeClass('active-tag').addClass('tag-information');
  15. $(this).removeClass('tag-information').addClass('active-tag');
  16.  
  17. $.ajax({
  18. type: "GET",
  19. url: "/index.php?route=/product/search/ajaxSearch",
  20. data: obj,
  21. dataType: "html",
  22. success: function(data) {
  23. $(".search-content").html(data);
  24. }
  25. }).fail(function() {
  26. alert("При передаче данных возникла ошибка");
  27. });
  28.  
  29.  
  30.  
  31. });
  32. })
Runtime error #stdin #stdout #stderr 0.04s 16948KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.js:3:1 ReferenceError: $ is not defined
Stack:
  @prog.js:3:1