[bugfix] jQuery scope fix suggested by @Odyno