1

複数のインスタンスを作成したい名前空間ユーティリティがいくつかありますが、それを機能させることができないようです。

私のモジュールは次のようになります。

Project.utilities.gallery.position = (function() {

// WILL CREATE THE BUBBLES FOR THE SLIDESHOW AND WILL THEN MOVE THEM AUTOMATICALLY AFTER BEING TRIGGERED

var slide_container, position_container;    
var create = function(_container) {//this function will be responsible for creating the bubbles for the slideshow

    if (typeof _container == "undefined"){
        return false;
            }

    slide_container = _container.children('.content');      
    slide_container = _container;
};

var update = function() {//this will be responsible for updating the slideshow!     
    console.log(slide_container);
};

私が何かをしようとすると

var test = Project.utilities.position;
test.create("hello world from test");

var test_2 = Project.utilities.position;
test_2.create("Hello world from test_2");

test.update() // outputs "hello world from test_2", not "hello world from test"

正しく動作するようにするにはどうすればよいですか?

4

0 に答える 0