Ok. I think i will use that way because too me it looks a lot cleaner.
bmsterling wrote:
>
> Eridius,
> Your plugin code will work, but the preferred method is the method that
> Bernd wrote.
>
> On 8/13/07, Eridius <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> everything you said there makes sense but the plugin code, i thought i
>> made
>> the plugin like this:
>>
>> jQuery.fn.hover_menu = function(offset, speed)
>> {
>> var self = this;
>> ${self).children('<li>').each(fucntion()
>> {
>> //grab current margin
>> var current_margin = this.css('marginLeft');
>> });
>> }
>>
>>
>>
>> Bernd Matzner-2 wrote:
>> >
>> >
>> > Hi Eridius,
>> >
>> > yes, "this" refers to the object passed to the plugin, in your case
>> >
>> > $('#hover_menu').hover_menu();
>> > which would be shorter than
>> > $('div[id=hover_menu]').hover_menu()
>> >
>> >
>> > (function($)
>> > {
>> > $.fn.hover_menu = function(){
>> > $(this).children('ul').children('li').hide();
>> > };
>> > })( jQuery );
>> >
>> > I assume that in your div you have an unordered list, so with this
>> > code you would traverse to any <li> tags in any unordered list within
>> > your div.
>> > Does that help?
>> >
>> > Bernd
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Making-An-Intergrated-Plugin-tf4263097s15494.html#a12132782
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Benjamin Sterling
> http://www.KenzoMedia.com
> http://www.KenzoHosting.com
>
>
--
View this message in context:
http://www.nabble.com/Making-An-Intergrated-Plugin-tf4263097s15494.html#a12134767
Sent from the JQuery mailing list archive at Nabble.com.