Undocumented API request does not work

3 views
Skip to first unread message

Nicolas Toniazzi

unread,
Oct 7, 2011, 6:01:20 AM10/7/11
to Jcrop Development Discussion
I want to get the API way after initialization of Jcrop. I tried the $
("#crop").Jcrop("api"), but it returns a jQuery collection.

Here is a patch for this :
1529a1530,1531
> var retVal = this;
>
1535c1537,1538
< return $(this).data('Jcrop');
---
> retVal = $(this).data('Jcrop');
> return false; // breaks the each loop
1549c1552
< return this;
---
> return retVal;

I know I could simply use $("#crop").data("Jcrop") but it's not
satisfying.
Reply all
Reply to author
Forward
0 new messages