Skip to content

Commit fbbfc4b

Browse files
committed
replace js.This
1 parent 2d1c86e commit fbbfc4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test/index.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ func main() {
319319

320320
jQuery(htmlsnippet).AppendTo(FIX)
321321

322-
jQuery(FIX).Find("div").On("click", func() {
322+
jQuery(FIX).Find("div").On("click", func(evt jquery.Event) {
323323

324324
html := []string{"The clicked div has the following styles:"}
325-
var styleProps = jQuery(js.This).CssArray("width", "height")
325+
var styleProps = jQuery(evt.Target).CssArray("width", "height")
326326
for prop, value := range styleProps {
327327
html = append(html, prop+": "+value.(string))
328328
}

0 commit comments

Comments
 (0)