build a mini-version of jquery from scratch