Try inspect this running the following script:

$('.test').click(function() {
  alert('this node name = ' + this.nodeName);
  alert('this nome type  = ' + this.nodeType);
  alert('this  node text = ' + $(this).text());
 });
Hope that help
MaurĂ­cio


-----Mensagem Original----- De: "bob" <xoxeo...@gmail.com>
Para: "jQuery (English)" <jquery-en@googlegroups.com>
Enviada em: domingo, 11 de janeiro de 2009 14:40
Assunto: [jQuery] this inside of click event



Hi,
What does this inside of
$('.test').click(function() {
refer to?

<script type="text/javascript">
 $(document).ready(function() {
 $('.test').click(function() {
alert('this = ' + this);
 });

 });
</script>

<a href="#" class="test">Click Me</a>

Reply via email to