ditto
ditto

Reputation: 6277

jQuery: Getting object value?

console.log(this) throws:

Object
    eles: Object
        container: x.fn.x.init[1]
        ele: x.fn.x.init[1]
        0: div.cropMain
        context: document
        length: 1
        prevObject: x.fn.x.init[1]
        selector: ".two .cropMain"
        __proto__: Object[0]
        img: x.fn.x.init[1]

How can I grab the selector value: ".two .cropMain"?

Upvotes: 1

Views: 1634

Answers (1)

colestrode
colestrode

Reputation: 10658

You can access it like this:

this.eles.selector

Upvotes: 4

Related Questions