Jquery function . date

Asked

Viewed 18 times

0

Can anyone enlighten me or explain to me the difference between these two situations

$.data(this, 'timer')

Or

$(this).data('timer');

1 answer

0

They do the same thing. jQuery allows doing the same thing in different ways, this is a good example of this.

In the documentation this is confirmed:

Note: This is a low-level method; a more convenient .data() is also available.

Note: This is a low-level method; another more convenient .data() there is also.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.