3 ms·
Is anyone using custom selectors? quick googling only returns 5+ years old results
by yread 10y ago
Is anyone using custom selectors? quick googling only returns 5+ years old results
- balac 10y agoI use :input (https://api.jquery.com/input-selector/ https://api.jquery.com/input-selector/) occasionally
- klean92 10y agoI use :visible. The notes say it can increase speed 17x in certain cases.
- vonklaus 10y agoThe notes say it is computationally expensive and bad for performance. Using this selector heavily can have performance implications, as it may force the browser to re-render the page before it can determine visibility. Tracking the visibility of elements via other methods, using a class for example, can provide better performance. To be clear, it is 17x faster than it was.
- ashmud 10y agoI did at one point in time for flagging links to show a "leaving site" prompt. Now the JS simply checks any link when you click it (no more custom selector for flagging).