Skip to content

Commit

Permalink
Added ocaml-jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
cagdasbozman committed Jun 22, 2012
1 parent 1099c4a commit 1f0e85f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -44,4 +44,6 @@ clean:
@echo "[CLEAN]"
-rm -f $(OQUERY)
-find . -name "*.cm[oix]" -exec rm {} \;
-find . -name "*.cm[t]" -exec rm {} \;
-find . -name "*.cmt[i]" -exec rm {} \;
${MAKE} -C examples clean
11 changes: 7 additions & 4 deletions jQuery.ml
Expand Up @@ -41,6 +41,7 @@ class type jQuery = object
method animate : Dom_html.cssStyleDeclaration t -> duration_pre opt
-> easing_pre opt -> 'a callback opt -> jQuery t meth
method append : js_string t -> unit meth
method attr : js_string t -> js_string t meth
method blur : 'a callback opt -> jQuery t meth
method change : 'a callback opt -> jQuery t meth
method clearQueue : js_string t opt -> jQuery t meth
Expand Down Expand Up @@ -71,9 +72,11 @@ class type jQuery = object
method html : js_string t meth
method html_set : js_string t -> jQuery t meth
method length : int readonly_prop
method live : Dom_html.event t -> 'a callback -> jQuery t meth
method live : 'a Dom.Event.typ-> 'a callback -> jQuery t meth
method prepend : js_string t -> unit meth
method queue : js_string t opt -> js_string t js_array t meth
method ready : 'a callback -> jQuery t meth
method remove : unit meth
method removeClass : js_string t opt -> jQuery t meth
method removeClass_ : (int -> js_string t -> js_string t) callback
-> jQuery t meth
Expand All @@ -98,6 +101,9 @@ class type jQuery = object
method val_set : js_string t -> jQuery t meth
method width : int meth
method width_set : int -> jQuery t meth
method tableFilter : unit meth
method tableFilterApplyFilterValues : unit meth


(* TODO : implement the right types for these methods c.f. jQuery API
method ajaxError
Expand All @@ -107,7 +113,6 @@ class type jQuery = object
method ajaxSuccess
method andSelf
method appendTo
method attr
method before
method bind
method change
Expand Down Expand Up @@ -169,7 +174,6 @@ class type jQuery = object
method parents
method parentsUntil
method position
method prepend
method prependTo
method prev
method prevAll
Expand All @@ -178,7 +182,6 @@ class type jQuery = object
method prop
method pushStack
method ready
method remove
method removeAttr
method removeData
method removeProp
Expand Down
7 changes: 6 additions & 1 deletion jQuery.mli
Expand Up @@ -41,6 +41,7 @@ class type jQuery = object
method animate : Dom_html.cssStyleDeclaration t -> duration_pre opt
-> easing_pre opt -> 'a callback opt -> jQuery t meth
method append : js_string t -> unit meth
method attr : js_string t -> js_string t meth
method blur : 'a callback opt -> jQuery t meth
method change : 'a callback opt -> jQuery t meth
method clearQueue : js_string t opt -> jQuery t meth
Expand Down Expand Up @@ -71,9 +72,11 @@ class type jQuery = object
method html : js_string t meth
method html_set : js_string t -> jQuery t meth
method length : int readonly_prop
method live : Dom_html.event t -> 'a callback -> jQuery t meth
method live : 'a Dom.Event.typ -> 'a callback -> jQuery t meth
method prepend : js_string t -> unit meth
method queue : js_string t opt -> js_string t js_array t meth
method ready : 'a callback -> jQuery t meth
method remove : unit meth
method removeClass : js_string t opt -> jQuery t meth
method removeClass_ : (int -> js_string t -> js_string t) callback
-> jQuery t meth
Expand All @@ -98,6 +101,8 @@ class type jQuery = object
method val_set : js_string t -> jQuery t meth
method width : int meth
method width_set : int -> jQuery t meth
method tableFilter : unit meth
method tableFilterApplyFilterValues : unit meth
end

(** Easy way to call the jQuery object jQ "#foo" <=> $("#foo") **)
Expand Down

0 comments on commit 1f0e85f

Please sign in to comment.