質問

Let's say I have script file which is work with jQuery.

//script.js
    shuffleGridView: function (i, j) {
        var h = this.element.find(this.options.gridSelector),
            f = i ? this.options.colsSidebarClosed : this.options.colsSidebarOpen,
            g = i ? this.options.colsSidebarOpen : this.options.colsSidebarClosed;
        if (d.AsSupport.transition && !d.AsSupport.touch) {
            j = j || 1;
            d.AsGridShuffle(h, {
                startColCount: f,
                endColCount: g,
                startIndex: j
            })
        }
    }

What I want to do, calling this function ( shuffleGridView) from firebug console. Is there a way to call this function?

役に立ちましたか?

解決

It appears that shuffleGridView is a property of an object.

If object is in global namesapace run in console with:

objectName.shuffleGridView(value1,value2);

No need to use console.log() from within browser console...it will run as is.

For example paste this into console:

var foo="bar";
foo

Should see "bar" output

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top