Top "This" questions

Keyword that refers to the current class instance or object in many object-oriented programming languages.

JQuery: How to select all elements with same class besides the one clicked?

I guess I'm looking for an opposite to $(this). If I have 3 elements with the same class how can I …

jquery class selector this next
Can 'this' ever be null in Javascript

I have a function along the lines of the following: doSomething: function () { var parent = null; if (this === null) { parent = 'some …

javascript null this
How to use $this in closure in php

I have function like this: class Service { function delete_user($username) { ... $sessions = $this->config->sessions; $this->config-&…

php closures this anonymous-function
Returning 'this' in a static method

I would like to make a static class with a fluent interface but I am getting the error: 'this' is …

c# .net this static-classes
Javascript: Do I need to put this.var for every variable in an object?

In C++, the language I'm most comfortable with, usually one declares an object like this: class foo { public: int bar; …

javascript scope this
Can't assign this in constructor

I'm trying to merge the props from values into this. The following throws an error. How can I do this? …

javascript ecmascript-6 this assign
Why is JavaScript bind() necessary?

The problem in example 1 is 'this' referring to the global name instead of the myName object. I understand the use …

javascript this bind
Access to static properties via this.constructor in typescript

I want to write es6 class: class SomeClass { static prop = 123 method() { } } How to get access to static prop from method() …

typescript this static-methods static-members typescript1.6
When NOT TO USE 'this' keyword?

Sorry for asking it again, there are already some questions about this keyword. But all of them tell the purpose …

c# this this-keyword
Angular: How to get an input value using $this

I am hoping to get an input value inside a keyup function that can runs from multiple inputs. Every time …

javascript angularjs this keyup