In order for you to create your own objects/elements, you need to study the example thoroughly.
Your current Javascript code is only an initiation of -
isotope.pkgd.js
I would suggest to read all of the documentation pertaining to this file first to get a better understanding of its operations, which in turn will ensure you create the object you expect.
I found
THIS link with reasonable easy step by step explanations.