Hacker News new | past | comments | ask | show | jobs | submit login

That isn't necessary. This does the same thing:

  var d = $('#elm');
  d.color('red');
  // do some stuff here.
  d.text('new text');



Some use the convention that jQuery objects should be prefixed with $, so:

  var $d = $('#elm');
  $d.color('red');
  $d.text('new text');
I do this, and like it, despite my classic aversion to both Systems Hungarian and GW-BASIC.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: