Add preventDefault() on click event
This commit is contained in:
parent
70ff31d69f
commit
91156b6f0c
|
@ -111,7 +111,9 @@ paintIt = (element, backgroundColor, textColor) ->
|
|||
element.style.color = textColor
|
||||
|
||||
$ ->
|
||||
$("a[data-background-color]").click ->
|
||||
$("a[data-background-color]").click (e) ->
|
||||
e.preventDefault()
|
||||
|
||||
backgroundColor = $(this).data("background-color")
|
||||
textColor = $(this).data("text-color")
|
||||
paintIt(this, backgroundColor, textColor)
|
||||
|
|
Loading…
Reference in New Issue