JQuery wildcard selection

2010-06-11

To select a wildcard selection on jquery, use the selector:

$("[id^=pnl]")

with ‘pnl’ replaced by the name of your selector.

For example, when trying to select all elements with the id ‘sub_’ prefix, just do a

$("[id^=sub]")

I’m currently working on fyra.sh, a CLI-first static site deployment tool where you push your site and it’s served globally through a built-in CDN, without the overhead of heavy platforms.