Make JS example more generic for jQuery users