現在、コードをオブジェクト内に保持するために、クリックイベントの内容をメソッドに変換したいのですが、これがどのように行われるかについてはあまりわかりません。現在のコードは次のようになります。
現在のJS
init: function(){
            var _this = this,
                slides_li = _this.els.slides.children(),
                large = 260,
                small = 60;
            // Hover
            slides_li.on('mouseover', function(){
                $(this).stop(true, true).animate({ opacity: 1 }, 300);
            }).on('mouseout', function(){
                $(this).stop(true, true).animate({ opacity: .8 }, 300)
            });
            // Click handlers
            slides_li.on('click', function(){
//このコードを独自のメソッドtoggle_slides()に移動しますか??
                $('.active', _this.els.slides).not(this).animate({
                    width: small
                }, 300).removeClass('active');
                // animate the clicked one
                if ( !$(this).hasClass('active') ){
                    $(this).animate({
                        width: large
                    }, 300).addClass('active');
                }                
            });                 
        }
しかし、コードを次のようにしたいと思いますが、いくつかの重要な点が欠落していることはわかっています。さらに、これは明らかにクリックされたイベントを意味するものではありません。
JS
init: function(){
            var _this = this,
                slides_li = _this.els.slides.children(),
                large = 260,
                small = 60;
            // Hover
            slides_li.on('mouseover', function(){
                $(this).stop(true, true).animate({ opacity: 1 }, 300);
            }).on('mouseout', function(){
                $(this).stop(true, true).animate({ opacity: .8 }, 300)
            });
            // Click handlers
            slides_li.on('click', function(){
                toggle_slides(); //pass in this?
            });                 
        },
        toggle_slides: function(){ // add argument for this?
               $('.active', _this.els.slides).not(this).animate({
                    width: small
                }, 300).removeClass('active');
                // animate the clicked one
                if ( !$(this).hasClass('active') ){
                    $(this).animate({
                        width: large
                    }, 300).addClass('active');
                }                
        }
誰かがこれを機能させる方法についてアドバイスを提供できますか?