From 10242195291ed7f479bf88da46035f4b8db490d0 Mon Sep 17 00:00:00 2001 From: carson Date: Mon, 25 Jan 2021 15:00:05 -0700 Subject: [PATCH] better API docs --- www/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/api.md b/www/api.md index b9d832f9..45b54abb 100644 --- a/www/api.md +++ b/www/api.md @@ -256,7 +256,7 @@ or htmx.off("click", myEventListener); // remove this click listener from the given div - var allParagraphsInMyDiv = htmx.off(htmx.find("#my-div"), "click", myEventListener) + var allParagraphsInMyDiv = htmx.off("#my-div", "click", myEventListener) ``` ### Method - [`htmx.on()`](#on) @@ -281,7 +281,7 @@ or var myEventListener = htmx.on("click", function(evt){ console.log(evt); }); // add a click listener to the given div - var myEventListener = htmx.on(htmx.find("#my-div"), "click", function(evt){ console.log(evt); }); + var myEventListener = htmx.on("#my-div", "click", function(evt){ console.log(evt); }); ``` ### Method - [`htmx.onLoad()`](#onLoad)