Skip to content

can not access the element on which function is called #779

Closed
@zeeeuu

Description

@zeeeuu

[a simple jquery plugin ] (https://jsfiddle.net/28jof5th/4/)

in the fiddle on line 147 when i try to do console.log(this) then it gives the window object not the element which is passed in the function call on line 166 $('#loadImage').loadImage() with the id loadImage. It leads to bind a click event handler on the whole window but not on the element. It means event fires when where ever i click on the page. so my problem is why i am not able to access the element but window object at line 147

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions