1$(document).ready(function () { 2 /* Favorites */ 3 $('.favorite_i').on('click', function (e) { 4 5 var favorID = $(this).attr('data-item'); 6 if ($(this).hasClass('active')) { 7 var doAction = 'delete'; 8 9 //$('.fav_page').find('.favor[data-item="' + favorID + '"]').parents('.cat_list').remove(); // ÐоменÑалÑное Ñдаление, еÑли Ð¼Ñ Ð½Ð° ÑÑÑаниÑе избÑанного 10 } 11 else { 12 var doAction = 'add'; 13 14 } 15 addFavorite(favorID, doAction); 16 }); 17 /* Favorites */ 18}); 19 20/* ÐзбÑанное */ 21function addFavorite(id, action) { 22 var param = 'id=' + id + "&action=" + action; 23 $.ajax({ 24 url: '/bitrix/components/approof/favorites1/ajax.php', // URL оÑпÑавки запÑоÑа 25 type: "GET", 26 dataType: "html", 27 data: param, 28 success: function (response) { 29 var result = $.parseJSON(response); 30 if (result == 1) { // ÐÑли вÑÑ Ñ Ð¾ÑоÑо, Ñо вÑполнÑем дейÑÑвиÑ, коÑоÑÑе показÑваÑÑ, ÑÑо даннÑе оÑпÑÐ°Ð²Ð»ÐµÐ½Ñ 31 $('.favor[data-item="' + id + '"]').addClass('active'); 32 var wishCount = parseInt($('#want .col').html()) + 1; 33 $('#want .col').html(wishCount); // ÐизÑалÑно менÑем колиÑеÑÑво Ñ Ð¸ÐºÐ¾Ð½ÐºÐ¸ 34 } 35 if (result == 2) { 36 $('.favor[data-item="' + id + '"]').removeClass('active'); 37 var wishCount = parseInt($('#want .col').html()) - 1; 38 $('#want .col').html(wishCount); // ÐизÑалÑно менÑем колиÑеÑÑво Ñ Ð¸ÐºÐ¾Ð½ÐºÐ¸ 39 } 40 }, 41 error: function (jqXHR, textStatus, errorThrown) { 42 console.log('Error: ' + errorThrown); 43 } 44 }); 45} 46 47/* ÐзбÑанное */
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.