Jörn Zaefferer wrote: > Stephen Woodbridge schrieb: >> Hi all, >> >> I'm trying to write my first plugin and I'm having some conceptual >> problems on how to organize stuff and getting my head wrapped around >> this. The plugin will be for turning a div into an interactive mapping >> application. > Just a quickie: Why don't you integrate the Resizable into your Map > method? Makes coding it way easier.
Ah, you mean load it like normal, but directly call jQuery.Resizable.whatever() directly. Yeah, I can do that. Like I said, getting over the initial duh! thats obvious stuff is hard sometimes. Working with a plugin for use to manipulate DOM objects has a pattern, but using a plugin inside of another plugin does not seem to be same pattern. > Another point: To interact from other controls with your Map, you may > want to hijack jQuery's event system, using bind, trigger and some > wrapper methods. I did just that in my latest accordion update, it works > very well and elegant: http://joern.jquery.com/accordion/accordion.html > The intersting part is at the end here: > http://joern.jquery.com/accordion/jquery.accordion.js > $.fn.activate calls trigger, which calls an event handler that was > registered via bind. Because the actual handler is defined inside the > plugin method, I don't have to pass around tons of variables, they are > all in one closure. Yeah that is cool, I can probably make use of that. > Hope that helps somehow. > Yeah, helps a bunch. I'm just trying to get my head around the problem to do this in a jQuery-ish way. Once I have worked through a few of these conceptual problems, I'll start coding otherwise it will be a total hack job instead of only a partial hack job ;) Thanks, -Steve _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/