Skip to content

Instantly share code, notes, and snippets.

@stevelacey
Last active May 10, 2024 15:01
Show Gist options
  • Select an option

  • Save stevelacey/28e4bdf19e3959d6f7d0 to your computer and use it in GitHub Desktop.

Select an option

Save stevelacey/28e4bdf19e3959d6f7d0 to your computer and use it in GitHub Desktop.
obj =
init: ->
@keirsform = $('form.keirform') # could be a wrapper further up, or maybe even the document
# - just something that doesn't get swapped in or out is easiest
@keirsform.on 'click', '.form__item__remove', (e) =>
e.preventDefault()
@removeURL $(e.currentTarget)
removeURL: ($link) ->
console.log $link
$link.text $link.text().replace /url/, ''
obj.init()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment