Browse Source

Выводим кнопку поделиться при любом изменении в поле ввода #28

pull/30/head
Artur Galyamov 2 years ago
parent
commit
f8aa446030
  1. 8
      cms/templates/articles/new.html

8
cms/templates/articles/new.html

@ -38,10 +38,10 @@
const renderedButton = VK.Share.button(gen) const renderedButton = VK.Share.button(gen)
$('#vkShare').html(renderedButton) $('#vkShare').html(renderedButton)
} }
const $linkInput = $('[name="link"]');
$('[name="link"]').change((e) => { $linkInput
appendShare($(e.target)) .on('input', (e => appendShare($(e.target))))
}) .on('paste', (e => appendShare($(e.target))))
}) })
</script> </script>
{% endblock %} {% endblock %}
Loading…
Cancel
Save