Can somebody please explain how “this” works in jQuery. I tried to find some information on the net, but because “this” is used a lot in his usual meaning I couldnt find anything good.
I would like to be able to change the background of a list element (<li>) onclick without giving each list element an id.
Here is an example.
$(this)refers to the JQuery object,thisrefers to the regular DOM object that was clicked on.