3 ms·
The biggest irritations for me: * Variable argument types determine different kind of behavior, like ajax taking a string or object as 1st argument. Other fun
by libria 7y ago
The biggest irritations for me:
* Variable argument types determine different kind of behavior, like ajax taking a string or object as 1st argument. Other functions take a function or string as a parameter. I'd much prefer it enforce a single style or define a new method, ajaxurl() and ajaxobj().
* naming of `off()`. In this context, off is not the opposite of on. On here means 'in event of'. A better word would be 'cancel' or 'mute' or 'ignore'.
element.on('click', dostuff);
element.ignore('click');
off('click')/off('mouseover') sounds like if you click/hover off the dialog box which is incorrect.