We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b9bed7 commit c18e27eCopy full SHA for c18e27e
jquery.go
@@ -53,7 +53,7 @@ type JQuery struct {
53
o js.Object
54
Jquery string `js:"jquery"`
55
Selector string `js:"selector"` //deprecated according jquery docs
56
- Length string `js:"length"`
+ Length int `js:"length"`
57
Context string `js:"context"`
58
}
59
@@ -199,8 +199,10 @@ func Unique(arr js.Object) js.Object {
199
200
201
//methods
202
-func (j JQuery) Each(fn func(int, interface{}) interface{}) JQuery {
203
- j.o = j.o.Call("each", fn)
+func (j JQuery) Each(fn func(int, JQuery)) JQuery {
+ j.o = j.o.Call("each", func(idx int, elem js.Object) {
204
+ fn(idx, NewJQuery(elem))
205
+ })
206
return j
207
208
0 commit comments