From 6c3f2971867f683b139cf84ff84045647b3edb73 Mon Sep 17 00:00:00 2001 From: Ivan Bozhanov Date: Sun, 17 Feb 2013 22:32:43 +0200 Subject: [PATCH] updated readme --- README.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ee844c51..91d6ea4a 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,7 @@ Download the [production version][min] or the [development version][max]. ``` @@ -35,11 +30,11 @@ jQuery(function($) { ``` /* METHOD ONE */ -jQuery("some-selector-to-container-node-here") +jQuery("#container") .jstree("operation_name" [, argument_1, argument_2, ...]); /* METHOD TWO */ -jQuery.jstree._reference(needle) +jQuery.jstree.reference(needle) .operation_name([ argument_1, argument_2, ...]); ``` @@ -47,12 +42,12 @@ jQuery.jstree._reference(needle) jsTree uses events to notify of any changes. All events fire on the tree container in the _jstree_ namespace and are named after the function that triggered them. ``` -jQuery("some-container") - .jstree({ /* configuration here */ }) - .bind("__ready.jstree", function (event, data) { +jQuery("#container") + .bind("ready.jstree", function (event, data) { alert("TREE IS LOADED"); /* note the second parameter, read the docs on each event for its value */ }) + .jstree({ /* configuration here */ }); ``` ###Data: